Adds: Active time interval#2779
Conversation
|
Example: |
1bca2ae to
10218f0
Compare
simonpasquier
left a comment
There was a problem hiding this comment.
I agree that it makes sense.
simonpasquier
left a comment
There was a problem hiding this comment.
a few nits, otherwise lgtm
|
Thank you @simonpasquier |
fd7cd46 to
8563331
Compare
simonpasquier
left a comment
There was a problem hiding this comment.
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 <dubyte@gmail.com>
Signed-off-by: Sinuhe Tellez <dubyte@gmail.com>
Signed-off-by: Sinuhe Tellez <dubyte@gmail.com>
Co-authored-by: Simon Pasquier <spasquie@redhat.com> Signed-off-by: Sinuhe Tellez <dubyte@gmail.com>
Co-authored-by: Simon Pasquier <spasquie@redhat.com> Signed-off-by: Sinuhe Tellez <dubyte@gmail.com>
Signed-off-by: Sinuhe Tellez <dubyte@gmail.com>
Adds doc for a helper function Co-authored-by: Simon Pasquier <spasquie@redhat.com> Signed-off-by: Sinuhe Tellez <dubyte@gmail.com>
Co-authored-by: Simon Pasquier <spasquie@redhat.com> Signed-off-by: Sinuhe Tellez <dubyte@gmail.com>
Co-authored-by: Simon Pasquier <spasquie@redhat.com> Signed-off-by: Sinuhe Tellez <dubyte@gmail.com>
Co-authored-by: Simon Pasquier <spasquie@redhat.com> Signed-off-by: Sinuhe Tellez <dubyte@gmail.com>
Signed-off-by: Sinuhe Tellez <dubyte@gmail.com>
Signed-off-by: Sinuhe Tellez <dubyte@gmail.com>
Signed-off-by: Sinuhe Tellez <dubyte@gmail.com>
Co-authored-by: Simon Pasquier <spasquie@redhat.com> Signed-off-by: Sinuhe Tellez <dubyte@gmail.com>
Signed-off-by: Sinuhe Tellez <dubyte@gmail.com>
|
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 <dubyte@gmail.com>
Signed-off-by: Sinuhe Tellez <dubyte@gmail.com>
|
Thanks @benridley |
simonpasquier
left a comment
There was a problem hiding this comment.
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 <spasquie@redhat.com> Signed-off-by: Sinuhe Tellez <dubyte@gmail.com>
Co-authored-by: Simon Pasquier <spasquie@redhat.com> Signed-off-by: Sinuhe Tellez <dubyte@gmail.com>
0ab7210 to
17a5f5e
Compare
|
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. |
In prometheus#2779 the field was changed, but part was forgotten.
In prometheus#2779 the field was changed, but this part was forgotten. Signed-off-by: Solomon Jacobs <solomonjacobs@protonmail.com>
In #2779 the field was changed, but this part was forgotten. Signed-off-by: Solomon Jacobs <solomonjacobs@protonmail.com>
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