Grafanz - rate() showing wrong values

Hey guys, for some reason when we use rate, it shows the wrong value on the graph. We know there’s a lot more than 20 events in 15 seconds

rate() gives the average per-second rate per given time range - so in your case your plotting the “orbit_events per second, as averaged over 30s”

If you want to know “orbit_events per 30s” you can use the increase() function instead

See https://prometheus.io/docs/prometheus/latest/querying/functions/#rate and https://prometheus.io/docs/prometheus/latest/querying/functions/#increase for details :slightly_smiling_face:

Ohh I see, that works. Thanks so much!

Np - and also you might be interested in irate, which is “instantaneous per-second rate”, which can be useful in some cases

Beorn had a really good talk about rate queries at the last grafanacon https://www.youtube.com/watch?v=09bR9kJczKM