Prometheus alerting rules test - Understanding the "for" param

15 views
Skip to first unread message

Gagan Talreja

unread,
Jun 8, 2021, 11:29:29 AM6/8/21
to Prometheus Users
Hi,

I have this alerting query where I need an alert to fire if the query returns a value greater than a certain X. I have been trying to create tests for it but the alerts never fire. I tried to google the probable causes and found out that it can be due to the delays "for" parameter. I earlier set it to 5m but then I tried reducing it. The alerts then fire for <= 3m.

What I understood after reading some blogs that the for param makes the alert wait for a certain time and checks if the alert query also satisfies the condition after that time. I have created my tests such that it should be > X even after 5m but still, it doesn't fire. What can be the probable cause for this?
Reply all
Reply to author
Forward
0 new messages