I have some time series in Influxdb which are collected from Linux /proc
filesystem every 10 seconds - for example I/O operations on a hard drive.
These values are by definition strictly increasing, and I want to transform them into I/O operations per second (iops) and display them in Grafana.
This is the closest I've come so far:
SELECT difference(last("value")) / 10 FROM "disk_write" [WHERE <stuff>] GROUP BY time(10s)
I can't find a way to define this query in Grafana with a variable group by time interval.
The problem is, that I can't replace / 10
in the SELECT
block with / $interval
(which contains 10s
), which makes this query very slow if I display a huge time window.
How do I define this correctly?
You'll want to use DERIVATIVE().
Something like this: