-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds: Active time interval #2779
Conversation
Example:
|
1bca2ae
to
10218f0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that it makes sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a few nits, otherwise lgtm
Thank you @simonpasquier |
fd7cd46
to
8563331
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me (minus 2 last nits). I'd ask @roidelapluie to give it a review to make sure that I haven't missed anything critical. Thanks!
could you also rebase on top of the |
Signed-off-by: Sinuhe Tellez <[email protected]>
Signed-off-by: Sinuhe Tellez <[email protected]>
Signed-off-by: Sinuhe Tellez <[email protected]>
Co-authored-by: Simon Pasquier <[email protected]> Signed-off-by: Sinuhe Tellez <[email protected]>
Co-authored-by: Simon Pasquier <[email protected]> Signed-off-by: Sinuhe Tellez <[email protected]>
Signed-off-by: Sinuhe Tellez <[email protected]>
Adds doc for a helper function Co-authored-by: Simon Pasquier <[email protected]> Signed-off-by: Sinuhe Tellez <[email protected]>
Co-authored-by: Simon Pasquier <[email protected]> Signed-off-by: Sinuhe Tellez <[email protected]>
Co-authored-by: Simon Pasquier <[email protected]> Signed-off-by: Sinuhe Tellez <[email protected]>
Co-authored-by: Simon Pasquier <[email protected]> Signed-off-by: Sinuhe Tellez <[email protected]>
Signed-off-by: Sinuhe Tellez <[email protected]>
Signed-off-by: Sinuhe Tellez <[email protected]>
Signed-off-by: Sinuhe Tellez <[email protected]>
Co-authored-by: Simon Pasquier <[email protected]> Signed-off-by: Sinuhe Tellez <[email protected]>
* Support http_config for amtool Co-authored-by: Julien Pivotto <[email protected]> Co-authored-by: Simon Pasquier <[email protected]> Signed-off-by: clyang82 <[email protected]> Signed-off-by: Sinuhe Tellez <[email protected]>
Since the TopicARN field is a template string, it's safer to check for the ".fifo" suffix in the rendered string. Signed-off-by: Simon Pasquier <[email protected]> Signed-off-by: Sinuhe Tellez <[email protected]>
This change also adds unit tests for SNS configuration. Signed-off-by: Simon Pasquier <[email protected]> Signed-off-by: Sinuhe Tellez <[email protected]>
d9435e6
to
d7d335e
Compare
Signed-off-by: Sinuhe Tellez <[email protected]>
An issue has been identified related to this PR, @simonpasquier @roidelapluie , during testing with @dubyte If an active alert is muted, the only effect currently, is to mute notifications. Suggested paths to correct this:
Or
Or
|
Hi If all agreed I would like to move the discussion about the api change to that feature request. So we can close this PR. Thank you |
Correct but the state of an alert (muted/active) is always relative to an alert group. I agree with @dubyte that it should be addressed at the API/UI level. |
@benridley would you have time to review this PR by any chance (at least the UX)? |
Besides the minor typo above, this looks great. Thanks @dubyte, I think this will be a nice addition to AM. |
Signed-off-by: Sinuhe Tellez <[email protected]>
Signed-off-by: Sinuhe Tellez <[email protected]>
Thanks @benridley |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry @dubyte I had 2 last pending comments that I forgot to submit. Hopefully they are minor and easy to fix :)
Fix typo in documentation Co-authored-by: Simon Pasquier <[email protected]> Signed-off-by: Sinuhe Tellez <[email protected]>
Co-authored-by: Simon Pasquier <[email protected]> Signed-off-by: Sinuhe Tellez <[email protected]>
0ab7210
to
17a5f5e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Hi, I'm trying to use this feature and I'm defining my time intervals and corresponding routes as follows:
Furthermore, I have a prometheus rule with label Did I do something wrong here in the configuration? |
Here is a working example for you. It is a best practice to define your alertes with severity levels. We use 0-5, 5 being the most critical. So based on the group, severity and time of day the alert will be routed to the appropriate receiver configuration. We use distinct receiver configurations as the email template (in our case) need to be different for each case. Ex. Offhours is an email to a specific box. Critical daytime hours will open a ticket automatically with a ticketing app. And severity 3 will be handled with an email regardless of time of day. What you were doing wrong is not setting the mute_time_intervals. Which is when to NOT send a notification (ex. off-hours), Then the active_time_interval indicates what to actually DO during offhours. This is documented, but may not be clear at first read.
Hope this helps |
As a bonus, you can see how to do a regex OR statement for the severity (had me stumped for a while) with the new matchers. |
This is a PR that implements active time interval as in: #2778
The point is to use active_time_interval to express that alertmanager only sent alerts in the interval mentioned.
so in other words active_time_interval mutes in the complement of mute_time_interval