Skip to content
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

option to resolve alerts that fired inhibited #3034

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

edevil
Copy link

@edevil edevil commented Aug 2, 2022

Added new option to let resolve notifications flow from inhibited
alerts, if they fired unmuted.

Attempts to address #226

@rdegez
Copy link

rdegez commented Nov 30, 2023

We are in the same situation (like many other people I guess!) and desperately need this PR to be merged or a way to resolve inhibited alerts :-)

@RyanW8
Copy link

RyanW8 commented Jan 24, 2024

Any movement on this? A feature we desperately need!

Added new option to let resolve notifications flow from inhibited
alerts, if they fired unmuted.

Signed-off-by: André Cruz <[email protected]>
@edevil edevil force-pushed the resolve_inhibited branch from 2ccf81a to cfd55c2 Compare January 25, 2024 17:56
@cxdy
Copy link

cxdy commented Sep 25, 2024

Adding onto this, would really really love to see this get merged into a release. Real bummer this has been stale for so long, this would be a huge feature for my org.

@edevil If you aren't interested in cleaning up the merge conflicts here, I'm happy to take a stab at this.

@edevil
Copy link
Author

edevil commented Sep 25, 2024

@edevil If you aren't interested in cleaning up the merge conflicts here, I'm happy to take a stab at this.

At this point I have resolved conflicts several times. I would like some signal from the maintainer that there is a path forward otherwise it is time wasted.

@cxdy
Copy link

cxdy commented Sep 25, 2024

I reached out in the #prometheus-alertmanager channel on the CNCF Slack asking for some maintainer eyes.

Copy link

@cxdy cxdy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested locally with the opsgenie receiver and i got a resolution notification

not a maintainer so my review is meaningless but this is awesome, thank you!

@cxdy
Copy link

cxdy commented Oct 10, 2024

@gotjosh sorry to bug ya but any chance we can push this forward?

@gitirabassi
Copy link

@gotjosh could you please give your opinion as this is crucial for me too (as many others) and I'd like to understand what is your take on this. if it's just an issue with risky change, specific implementation or principles

I'd just like to understand if I should create my own fork too with this PR merged or could contribute somehow to this being merged.

Thank you for your continuous work

@gitirabassi
Copy link

@bwplotka maybe your opinion would also be great

@anarcat
Copy link

anarcat commented Dec 17, 2024

I reached out in the #prometheus-alertmanager channel on the CNCF Slack asking for some maintainer eyes.

was there a response on this?

i don't understand what's blocking this PR from being merged. in #226 (comment), @brian-brazil seemed to object to having a configuration option for this in the first place, and there were lots of different ideas in that thread...

i'm just not sure exactly what the way forward is, but i do know that it's pretty confusing that inhibited/silenced alerts don't show resolution, as the recipient of those notifications.

Comment on lines +530 to +540
isMuted := n.muter.Mutes(a.Labels)
if !isMuted && !a.Resolved() && n.resolveInhibited {
a.FiredUnmuted = true
}
// Do not send the alert if muted.
if n.muter.Mutes(a.Labels) {
muted = append(muted, a)
} else {
// Do send resolved notifications if configured
// to do so and the alert fired unmuted.
if !isMuted || (a.Resolved() && a.FiredUnmuted && n.resolveInhibited) {
filtered = append(filtered, a)
} else {
muted = append(muted, a)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i actually find this hunk a little confusing. why are we flipping a.FiredUnmuted here? the conditional looks *really* similar to the second one there, and, what's worse, the a.FireUnmuted` is reused there which, effectively, makes the second conditional look like:

!isMuted || (a.Resolved() && (!isMuted && !a.Resolved() && n.resolveInhibited) && n.resolveInhibited) 

which i think is equivalent to:

!isMuted || (!a.FiredUnmuted && a.Resolved() && && n.resolveInhibited) 

before a.FiredUnmuted is reset. i wonder if there's a way to make this code more readable, perhaps with a comment explaing why the FiredUnmuted flag is changed there?

@cxdy
Copy link

cxdy commented Feb 12, 2025

@anarcat

was there a response on this?

unfortunately it's been crickets. not sure what the best path forward here is :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants