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

feat: add default alertmanagers to silence form #5086

Merged

Conversation

david-caro
Copy link
Contributor

@david-caro david-caro commented Mar 6, 2023

This allows setting some default alertmanagers to select when
creating a new alert, overriding the current behavior of getting all
the ones that are not readonly.

This pull request adds a new configuration value under silenceForm.defaultAlertmanagers that allows specifying the names of the alertmanagers that will be set by default in the form to create a new silence.

For HA clusters of alertmanagers, if any of the members matches the name the whole cluster will be selected.

If it's not set, the behavior does not change.

The case for this came from adding two alertmanagers to our karma instance, but one of them being "specialized" and not really meant for most users to use. And to avoid users creating silences on that one by default, we thought of this change, that will prevent "doing the wrong thing" unless you really want to.

That will allow setting some default alertmanagers to select when
creating a new silence, overriding the current behavior of getting all
the ones that are not readonly.

Signed-off-by: David Caro <dcaro@wikimedia.org>
@david-caro david-caro force-pushed the add_default_alertmanagers_to_silence_form branch from 6685890 to d726d6b Compare March 6, 2023 16:47
@david-caro david-caro changed the title SilenceForm: add default alertmanagers option feat: add default alertmanagers to silence form Mar 6, 2023
@prymitive
Copy link
Owner

Thanks!

@prymitive prymitive merged commit e539c49 into prymitive:main Mar 8, 2023
@david-caro
Copy link
Contributor Author

That was fast and pleasant! Thanks a lot! (+100 for adding the tests xd, I'm not very well versed in typescript/react)

@david-caro david-caro deleted the add_default_alertmanagers_to_silence_form branch March 8, 2023 10:57
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants