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:
available
used
reserved
So in reality I will have:
disk.sda.available
disk.sda.used
disk.sda.reserved
disk.sdb.available
disk.sdb.used
disk.sdb.reserved
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.
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.
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
andsdb
) 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 havetotal
currently. I can get the total if IsumSeries(*)
.Is there a smart way I am perhaps missing? Would be lovely to have a single query and not 1 for each disk.