|
This is unreleased documentation for SUSE® Storage 1.12 (Dev). |
Kubelet Volume Metrics
About Kubelet Volume Metrics
Kubelet exposes the following metrics:
-
kubelet_volume_stats_capacity_bytes
-
kubelet_volume_stats_available_bytes
-
kubelet_volume_stats_used_bytes
-
kubelet_volume_stats_inodes
-
kubelet_volume_stats_inodes_free
-
kubelet_volume_stats_inodes_used
Those metrics measure information related to the file system of a PVC inside a Longhorn block device.
They are different than longhorn_volume_* metrics, which measure information specific to a Longhorn block device.
You can set up a monitoring system that scrapes Kubelet metric endpoints to obtains a status of PVC and set up alerts for abnormal events, such as the PVC being about to run out of storage space.
A popular monitoring setup is prometheus-operator/kube-prometheus-stack, which scrapes kubelet_volume_stats_* metrics and provides a dashboard and alert rules for them.
Longhorn CSI Plug-in Support
Longhorn CSI plug-in supports the NodeGetVolumeStats RPC according to the CSI spec.
This allows the kubelet to query the Longhorn CSI plug-in for status of PVC.
The kubelet then exposes that information in kubelet_volume_stats_* metrics.