-
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
also hide inhibited alerts #1039
also hide inhibited alerts #1039
Conversation
Internally this is often referred to as "muted". |
@beorn7 @stuartnelson3 what do you guys think about renaming this form param to |
We could do that. Or we create a new parameter |
Yes I think it would be good to be able to view inhibited, silenced, and firing alerts in all combinations. |
+1 to beorn's suggestion. Keep it flexibile in the API even if we don't make it an option from the UI. |
@stuartnelson3 @beorn7 @brancz done! |
@stuartnelson3 I'd better leave the code level review to you. (One day, I'll get familiar with Alertmanager internals, but not today…) |
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.
Generally looks good so far, but I would expect that I can toggle the front end to show me the inhibited alerts. As far as I can tell from this PR, this only handles the API filtering part. (if that is meant to be done in a subsequent PR, I'm fine with that as well)
@@ -343,6 +359,10 @@ func (api *API) listAlerts(w http.ResponseWriter, r *http.Request) { | |||
continue | |||
} | |||
|
|||
if !showInhibited && len(status.InhibitedBy) != 0 { |
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.
still hoping that we'll one day have a real index around this 🙂
Yeah, as far as I understood the original issue was about the backend only. I can change the frontend as well if required... |
@w0rm will take care of the frontend part (IIRC). |
In that case, this lgtm |
…metheus#1039) * If NRestarts or NRefused are not available, don't ignore the unit itself * Don't report systemd metrics (NRestarts/NRefused) that are not available Signed-off-by: James Hartig <james@getadmiral.com>
refs #1034
I feel like it would be better to rename the form parameter to something else, since it's not only silenced alerts anymore... what do you folks think?