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 upwhen I write an alert rule "for 1s",why use more than 1s from pending to firing? #2171
Comments
This comment has been minimized.
This comment has been minimized.
|
How long are you seeing? I believe it also depends on the evaluation interval. |
This comment has been minimized.
This comment has been minimized.
|
Just looked at the code and it looks like it needs two evaluation intervals to start firing, because the first evaluation puts the alert in the pending state, and then the second evaluation starts firing. You generally want to have evaluation and scrape interval somewhat synchronized and have around 3 samples until you start firing otherwise you will likely get alerts when it was just a single scrape failure and everything is actually ok, which would have been discovered by subsequent scrapes. |
This comment has been minimized.
This comment has been minimized.
|
how long two evaluation intervals? what should I config it? |
This comment has been minimized.
This comment has been minimized.
|
@brancz how long two evaluation intervals? what should I config it? |
This comment has been minimized.
This comment has been minimized.
|
@brancz how to control prometheus server‘s frequency to send alert state to alertmanager?
and prometheus conf: |
This comment has been minimized.
This comment has been minimized.
|
One evaluation interval is 1 minute by default. The |
This comment has been minimized.
This comment has been minimized.
|
thanks a lot ,when I stop the alert send email not use config silence,but use modify the alert rules file(stop alert email use remove the alert rule) and to reload prometheus server, it see wait 2m can stop send email. I see Alertmanager listening to the |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
I'm sorry but I don't think I understand what you are asking. |
This comment has been minimized.
This comment has been minimized.
|
oh,if you delete alert rule from |
This comment has been minimized.
This comment has been minimized.
|
Aha, so if I understand correctly, the problem is that even though you changed and reloaded the rule file (by either sending |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
If I understand correctly you're in a dilemma situation, you either need to decide for a |
This comment has been minimized.
This comment has been minimized.
|
@brancz hi,can I ask you an question? |
This comment has been minimized.
This comment has been minimized.
|
I believe what you are looking for is for example |
brian-brazil
closed this
Feb 13, 2017
This comment has been minimized.
This comment has been minimized.
lock
bot
commented
Mar 24, 2019
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |


jinhang commentedNov 7, 2016
What did you do?
What did you expect to see?
What did you see instead? Under which circumstances?
Environment
System information:
insert output of
uname -srmherePrometheus version:
insert output of
prometheus -versionhereAlertmanager version:
insert output of
alertmanager -versionhere (if relevant to the issue)Prometheus configuration file: