I have a gauge metrics that, for instance, gives me a result like this when querying panels_meters[30s]
gives me this result:
and a query like this delta(panels_meters[30s])
gives me the differenze between the last value and the value at 30 seconds ago.
BUT I want now the difference between the last two values, independently from the specified time. I just want something like panels_meters[0] - panels_meters[1]
assuming panels_meters as an array of data sorted chronologically inverse.
The idelta
function is what you want.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With