I have the prometheus query = sum by (job) (rate(http_requests_total[5m]))
Could you tell how can I create alert in grafana when the value is equal zero (longer than given time)
I cannot find proper function
Let's say you want an alert to fire when the 5m average has been zero for more than 5 minutes:

If you dislike the is below 0.01 you can turn the query into a boolean one like so:
sum by (job) (rate(http_requests_total[5m])) == bool 0
Now you will get a 1 if the rate is 0 and 0 if the rate is not 0.
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