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

Allow webex roomID from template #3801

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

Conversation

bakito
Copy link

@bakito bakito commented Apr 10, 2024

I my environment I'd like to be able to define different webex roomIDs for different namespaces.
This PR adds the possibility to use templates in the webex roomID field, which allow to get the roomID from GroupVariables.

@grobinson-grafana
Copy link
Contributor

I took a look at some of the other integrations supported in Alertmanager (Discord, Slack, Microsoft Teams, Telegram, VictorOps) and it seems like templates are not supported for the channel/room. I think the general advice is to have a separate receiver for each Room ID, and then route to the correct receiver using label matchers. What do you think @gotjosh?

@bakito
Copy link
Author

bakito commented Apr 10, 2024

Just because they do not (yet) support it, should that mean other should not?
Email also supports the to field from templates.

@grobinson-grafana
Copy link
Contributor

Just to help us understand the use case better, how many Room IDs are you planning to use with your template? Is it a large enough number that creating separate integrations would be a maintenance headache?

@bakito
Copy link
Author

bakito commented Apr 10, 2024

We have a setup of prometheus and alertmanager using the kube-prometheus-stack.
We have several Team wit n namespaces, where each team has n namespaces.
Each Team has 1 - n Rooms for their notifications.

The main issue with webex is not the roomID, but the Token used for the Bot to authenticate.

Teams could create their own AlertmanagerConfig custom resource in each namespace. But then they would always need to know the Bot's auth token for this config.

Managing all this recievers on the default config is not dynamic enough as teams can dynamically create and destroy namespaces via self service.

If the roomId could be fetched from GroupVariables provided by Prometheus Rules (Each namespace has already their own set of rules), one central receiver config could be used and teams would not have to bother about the auth token.

We would like to use the same Webex Bot for all notifications, but the token should not be spread over several namespaces.

@grobinson-grafana
Copy link
Contributor

Teams could create their own AlertmanagerConfig custom resource in each namespace. But then they would always need to know the Bot's auth token for this config.

Would credentials_file work for that use case? You would mount a volume with the credentials file in it.

@bakito
Copy link
Author

bakito commented Apr 12, 2024

Would credentials_file work for that use case? You would mount a volume with the credentials file in it.

Mabe with the token, but not with the main issue I'm trying to address here. Which is the boilerplate configuration of n notifiers where only the roomId changes.

Copy link
Contributor

@grobinson-grafana grobinson-grafana left a comment

Choose a reason for hiding this comment

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

LGTM!

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.

None yet

2 participants