Monitor filesystem usage
  • 1 Minute to read
  • PDF

Monitor filesystem usage

  • PDF

Article summary

This topic shows how to use popular monitoring tools to understand your current filesystem utilization and to determine the potential savings of using Zesty Disk.

You can use the following queries.

Datadog

Copy this query:

{"data":{"type":"notebooks","attributes":{"name":"Zohar 27 Jul 2021 18:43","time":{"live_span":"1h"},"cells":[{"id":"ozi75r3n","type":"notebook_cells","attributes":{"definition":{"type":"markdown","text":"Percentage of total volume which is free space"}}},{"id":"5k5atuh9","type":"notebook_cells","attributes":{"definition":{"type":"query_value","requests":[{"formulas":[{"formula":"query1 / query2"}],"queries":[{"query":"avg:system.disk.free{*}","data_source":"metrics","name":"query1","aggregator":"sum"},{"query":"avg:system.disk.total{*}","data_source":"metrics","name":"query2","aggregator":"sum"}],"response_format":"scalar"}],"autoscale":true,"precision":2},"time":null,"graph_size":"xs"}},{"id":"t9v9w0nz","type":"notebook_cells","attributes":{"definition":{"type":"markdown","text":"Free capacity out of total capacity (over time)"}}},{"id":"taxzv7ar","type":"notebook_cells","attributes":{"definition":{"show_legend":true,"type":"timeseries","requests":[{"formulas":[{"formula":"query1"},{"formula":"query2"}],"queries":[{"data_source":"metrics","name":"query1","query":"sum:system.disk.total{*}"},{"data_source":"metrics","name":"query2","query":"sum:system.disk.free{*}"}],"response_format":"timeseries","style":{"palette":"dog_classic","line_type":"solid","line_width":"normal"},"display_type":"line"}],"yaxis":{"scale":"linear"}},"time":null,"split_by":{"keys":[],"tags":[]},"graph_size":"m"}}]}}}

Upload the query (“Notebook”).

New Relic

Run this query:

Get Free, Used, Total and Utilization : (NRQL)
SELECT SUM(Free) as 'Total Free (GB)', SUM(Used) as 'Total Used (GB)', SUM(Size) as 'Total Size (GB)', (SUM(Used) / SUM(Size)) * 100  as 'Utilization'
FROM (SELECT
    latest(host.diskFreeBytes)/1024/1024/1024 as'Free',
    latest(host.diskUsedBytes)/1024/1024/1024 as'Used',
    latest(host.diskTotalBytes)/1024/1024/1024 as'Size'
    FROM Metric FACET host.hostname)

Prometheus

For Linux operating systems, use these queries:

  • To get the total disk size:
    sum(node_filesystem_size_bytes / (1024^3))

  • To get the total amount of unused space on your disks:
    sum(node_filesystem_avail_bytes / (1024^3))

  • To get the percentage of available space:
    sum(node_filesystem_size_bytes / (1024^3))

For Windows operating systems, use these queries:

  • To get the total disk size:
    sum(windows_logical_disk_free_bytes  / (1024^3))

  • To get the total amount of unused space on your disks:
    sum(windows_logical_disk_size_bytes / (1024^3))

  • To get the percentage of available space:
    (sum(windows_logical_disk_free_bytes / (1024^3)) /


Was this article helpful?