Search code examples
kubernetesprometheusgrafanamonitoring

Monitoring disk usage of a pvc in grafana


I want to monitor the disk usage% of a specific filesystem in a pod (in grafana). I was wondering if there’s a Prometheus query I can use to do so.


Solution

  • To monitor PVC, disk usage %, you can use something like this

    100 - (kubelet_volume_stats_available_bytes / kubelet_volume_stats_capacity_bytes) * 100
    

    To monitor file system, disk usage %, you can use something like this

    100 - (node_filesystem_avail_bytes / node_filesystem_size_bytes * 100)
    

    Hope this helps.