I have a single stat in my grafana dashboard showing the current usage of a disk. To get that info I use the following query:
SELECT last("used") FROM "disk" WHERE "host" = 'server.mycompany.com'
AND "path" = '/dev/sda1' AND $timeFilter
I want to add another stat showing the increase/decrease in usage over the last 30 days. I assume for this I want to get the last measurement and the measurement from 30 days ago and subtract them.
How can I do this in InfluxQL?
It wont be perfect, but something to the effect of
should be sufficient.