graphite-project / graphite-web

A highly scalable real-time graphing system
http://graphite.readthedocs.org/
Apache License 2.0
5.89k stars 1.26k forks source link

[Q] Help with a query #2698

Closed nikobearrr closed 3 years ago

nikobearrr commented 3 years ago

Hi,

I would like to know if it is possible to create a specific query.

I would like to calculate % available disk space on my server. For each disk I have 3 series/files:

So in reality I will have:

and I would like to get for each disk (sda and sdb) how much % is available.

They way to calculate it is to find the total and then find how much % is used out of it: used asPercent of sumSeries(*)

However, that requires me to write it for each disk separately. What I would like to do is to have just a single query.

I have used reduceSeries before in such a way: reduceSeries(series, 'asPercent', 3, 'used', 'total') but the issue is that I do not have total currently. I can get the total if I sumSeries(*).

Is there a smart way I am perhaps missing? Would be lovely to have a single query and not 1 for each disk.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.