Search code examples
prometheusgrafanapromql

Visualize prometheus counter increase for each data point individually


I've setup a prometheus counter that is polled every 15 seconds and I am visualizing the data in grafana. Currently, I am seeing a simple, increasing line on the dashboard. That's nice, but I want to better visualize the individual changes. I want to select a set of data points, say last 30m and plot the increase of each individual data point when compared with the previous one.

Example

How it is currently:

Lets just say these are the data points from the previous 30 minutes.

418 -> 425 -> 430 -> 436 -> 443

This is how i want to transform it with a query:

[..] -> 7 -> 5 -> 6 -> 7 and so on.



How would I do this properly with a suitable query in grafana?


Solution

  • idelta

    you may try idelta(request_count[30m]).

    enter image description here