日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

Dapr+Net6 服务调用09:集群指标收集-普罗米修斯

發布時間:2024/1/8 编程问答 43 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Dapr+Net6 服务调用09:集群指标收集-普罗米修斯 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

1. 請參考上一篇文章創建基礎工程

Dapr+Net6 服務調用08:本地指標收集-普羅米修斯_敦格-CSDN博客Dapr+Net6 服務調用08:本地指標收集-普羅米修斯https://shuaihj.blog.csdn.net/article/details/122703624

2. 架構分析

Dapr?sidecar?公開指標收集終結點,Prometheus等收集器可通過此端點抓取指標。

3. 創建用于monitor的命名空間

kubectl create namespace dapr-monitoring

4. 安裝普羅米修斯到集群

helm repo add prometheus-community https://prometheus-community.github.io/helm-charts helm repo update helm install dapr-prom prometheus-community/prometheus -n dapr-monitoring --set nodeExporter.hostRootfs=false

5. 驗證安裝結果

kubectl get pods -n dapr-monitoring

6. 本地端口轉發到普羅米修斯

6.1.?獲取pod name

kubectl get pods --namespace dapr-monitoring -l "app=prometheus,component=server" -o jsonpath="{.items[0].metadata.name}"

6.2. 端口轉發?

kubectl --namespace dapr-monitoring port-forward dapr-prom-prometheus-server-7b9fc57479-xwggq 9090

7. 通過普魯米修斯查看指標結果

7.1. 訪問service02應用

http://localhost:30001/api/hello

7.2. 訪問普羅米修斯

http://localhost:9090/

8. 故障排除

Error: failed to start container "node-exporter": Error response from daemon: path / is mounted on / but it is not a shared or slave mount

解:helm install 命令最后增加參數?--set nodeExporter.hostRootfs=false

helm install dapr-prom prometheus-community/prometheus -n dapr-monitoring --set nodeExporter.hostRootfs=false

總結

以上是生活随笔為你收集整理的Dapr+Net6 服务调用09:集群指标收集-普罗米修斯的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。