我正在使用 stable/prometheus-operator 来监控 kubernetes 集群。但是所有 pod 的磁盘指标都显示为零。有什么办法可以解决这个问题。cadvisor 端点在 prometheus 中处于活动状态
服务监视器配置
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
creationTimestamp: '2019-10-24T06:40:18Z'
generation: 1
labels:
app: prometheus-operator-kubelet
chart: prometheus-operator-6.18.0
heritage: Tiller
release: prometheus
name: prometheus-prometheus-oper-kubelet
namespace: default
resourceVersion: '2595'
selfLink: >-
/apis/monitoring.coreos.com/v1/namespaces/default/servicemonitors/prometheus-prometheus-oper-kubelet
uid: 5039932b-3224-4c24-ae13-d9a2b540c02b
spec:
endpoints:
- bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
honorLabels: true
port: https-metrics
scheme: https
tlsConfig:
caFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
insecureSkipVerify: true
- bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
honorLabels: true
path: /metrics/cadvisor
port: https-metrics
scheme: https
tlsConfig:
caFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
insecureSkipVerify: true
jobLabel: k8s-app
namespaceSelector:
matchNames:
- kube-system
selector:
matchLabels:
k8s-app: kubelet