Search code examples
prometheusprometheus-node-exporter

Free bytes vs Avail bytes in Node Exporter


I am using Node Exporter on Ubuntu. I want to calculate the used / free disk space percentage. For the total disk space, I am taking the value of "node_filesystem_size_bytes". But, for the free space, which one of these should I take - "node_filesystem_avail_bytes" or "node_filesystem_free_bytes"?


Solution

  • "node_filesystem_avail_bytes" shows the available space you have as a user and the "node_filesystem_free_bytes" is the "physical" free space which includes the reserved space for root.

    So:

    node_filesystem_avail_bytes = node_filesystem_free_bytes - root reserved space

    node_filesystem_avail_bytes < node_filesystem_free_bytes