fix: container_fs metrics {device} has no label or info-metric to associate it with a volumeattachment or persistentvolumeclaim#3844
Conversation
…ociate it with a volumeattachment or persistentvolumeclaim
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
|
Currently, there is no way to associate a container workload with a pvc or volume attachment, the goal is to provide volume information based on the mount point to allow the user join on these metrics from kube-state-metrics or other programmatic forms to simplify associations. From the new prometheus metric Related issues:
|
01b3c37 to
3aec924
Compare
The hope is to return to the base image once google/cadvisor#3844 is merged
…ing (#18) * fix: deploy custom cadvisor image with pvc container device_info mapping The hope is to return to the base image once google/cadvisor#3844 is merged * update Helm documentation * fix: bump version for release * update Helm documentation --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
d6e0af7 to
3364ac9
Compare
This pull request adds improved tracking and reporting of filesystem mountpoints and container paths for disk metrics, enabling more accurate association of storage devices with container volumes (such as PersistentVolumeClaims) in Prometheus metrics. The changes include new fields in filesystem stats, a new Prometheus metric, and logic to extract volume names from mount paths, along with expanded test coverage.
Filesystem mountpoint and container path enhancements:
MountpointandContainerPathfields to theFsStatsstruct ininfo/v1/container.goand updated theFsstruct infs/types.goto track the host-side mountpoint for each filesystem device. [1] [2]fs/fs.goandcontainer/raw/handler.goto populate mountpoint and container path information when collecting filesystem stats, including mapping host mount directories to container paths using external mounts configuration. [1] [2] [3] [4]Prometheus metrics improvements:
container_fs_device_infoto expose device, mountpoint, container path, volume name, and volume type for container filesystems, allowing correlation with other disk metrics. [1] [2] [3] [4]Volume name extraction logic:
parseMountPointIntoVolumePathfunction inmetrics/prometheus.goto extract volume names and types from kubelet volume mount paths, supporting CSI and NFS volumes.Expanded test coverage:
container/raw/handler_test.goandmetrics/prometheus_test.go. [1] [2] [3]