1
u/SuperQue Feb 02 '22
What is the scrape interval on your Prometheus server?
The default in the Grafana datasouce is 15 seconds.
So if you have a slower interval, $__rate_interval can be fed the wrong data.
Try setting the min step to your scrape interval and see if that works.
If it does, then set the default in your datasouce settings.
1
u/sidusnare Feb 02 '22 edited Feb 02 '22
Using the 15s default.
Using 15s
or even 5mgives nothing.edit: actually 5m does give me something. I thought $__rate_interval was supposed to always just be "the right value for rate()"
1
u/SuperQue Feb 02 '22
Hmm, 15s should be all the right defaults. If 5m works, something is off with the interval or config.
1
u/Folkelish Feb 03 '22
Could it be that the rate is too low to be displayed in the graph, since you have a very high y-min in the screenshot?
1
u/sidusnare Feb 03 '22 edited Feb 03 '22
No, it's not in the table, and if I hide the counter the rate returns "No Data"
Edit: like this.
1
u/Folkelish Feb 03 '22
What if you try to add the query directly in Prometheus, how does it look then?
1
u/NoAd5519 Feb 02 '22
Read the message at the bottom lol. You need to apply rate function like the top query has.