Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upHow to config alert that can immediately trigger to firing states #4724
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Alerting rules are evaluated every minute by default which could explain why your alert doesn't fire if the metric goes up and back to zero in less than a minute. Please note also that your alert definition is prone to flapping as you don't have any I'm closing it for now. If you have further questions, please use our user mailing list, which you can also search. |
simonpasquier
closed this
Oct 11, 2018
This comment has been minimized.
This comment has been minimized.
|
Sorry,maybe the description of issue is not legible. I just want to known how config that alert can fire immediately? I find solution from Prometheus: understanding the delays on alerting So I delete for clause. but is works sometime, sometime not work So How can i do? thanks!!
|
This comment has been minimized.
This comment has been minimized.
|
Setting evaluation_interval to zero won't work as it will default to 1 minute. You can set it to |
This comment has been minimized.
This comment has been minimized.
As you said, if set evaluation_interval=scrape_interval / 2, it will generate lots of noise. Otherwise,the alert should be fired immediately, don't need any evaluation and Prometheus support it? |
This comment has been minimized.
This comment has been minimized.
I don't get what you mean. What is your use case for having an alert firing immediately? In general Prometheus alerting is defined in https://prometheus.io/docs/practices/alerting/, in particular this excerpt: "Allow for slack in alerting to accommodate small blips". |
This comment has been minimized.
This comment has been minimized.
|
My case is: the expr: |
This comment has been minimized.
This comment has been minimized.
|
This isn't exactly what Prometheus is meant for but you can try that:
This would fire the alert immediately and keep it firing for 5 minutes. You can obviously adjust the 5 minutes interval to your needs. |
This comment has been minimized.
This comment has been minimized.
good idea !!!!! |
This comment has been minimized.
This comment has been minimized.
|
thanks @simonpasquier |

pulord commentedOct 11, 2018
•
edited
Bug Report
What did you do?
want config an alert which can immediately trgger and send to alertmanager
What did you expect to see?
alretmanager receive alert immediately
What did you see instead? Under which circumstances?
sometime works,but Sometimes not works
Environment
docker
I can find promethues stored the metrics,but i can‘t find interrelated alerts for them

** sometimes its works **
** Expect **