The Management Pack for Kubernetes provides visibility to the storage metrics at the Node level and the Cluster level. This is now extended at the Namespace level and to differentiate them based on the PersistentVolumeClaim, mapping has been provided for Prometheus.
Source of the storage metrics is the kubelet, that needs to be configured as a target in Prometheus.
Metrics for Storage that are instanced on the
PersistentVolumeClaim.
- Volume Available(Bytes)
- Volume Capacity(Bytes)
- Total Inodes
- Inodes Free
- Inodes Used
Prometheus Config YAML for kubelet
- job_name: kubernetes-kubelet
honor_timestamps: true
scrape_interval: 20s
scrape_timeout: 10s
metrics_path: /metrics
scheme: https
authorization:
type: Bearer
credentials_file: /var/run/secrets/kubernetes.io/serviceaccount/token
tls_config:
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
insecure_skip_verify: true
follow_redirects: true
relabel_configs:
- separator: ;
regex: __meta_kubernetes_node_label_(.+)
replacement: $1
action: labelmap
- separator: ;
regex: (.*)
target_label: __address__
replacement: kubernetes.default.svc:443
action: replace
- source_labels: [__meta_kubernetes_node_name]
separator: ;
regex: (.+)
target_label: __metrics_path__
replacement: /api/v1/nodes/${1}/proxy/metrics
action: replace
kubernetes_sd_configs:
- role: node
follow_redirects: true