idealista / prom2teams

prom2teams is an HTTP server built with Python that receives alert notifications from a previously configured Prometheus Alertmanager instance and forwards it to Microsoft Teams using defined connectors
Apache License 2.0
274 stars 85 forks source link

[FEATURE] Allow passing teams channel url as a parameter instead of configuring it ahead of time in ini #270

Closed mitchellmaler closed 2 years ago

mitchellmaler commented 3 years ago

Description

We have many teams that use MS Teams and each one of them can create channels when needed. We are using the AlertManagerConfig CR for their namespace configurations to match alerts to be sent. prom2teams is deployed way ahead of the time without even knowing the teams channel urls which makes it difficult to go back and add each one when needed. I am proposing a way to call the webhook server and provide the teams url/connector config in that url as params.

webhookserver:port?url="https://msteamsurl" or even webhookserver:port?url_base64="MTIzNAo="

Why is this needed?

This would allow prom2teams to run as the proxy between alertmanager and MS teams but making it much more dynamic so teams can opt-in/self-service when they need alerts sent to MS Teams using the AlertManagerConfig CR. It would also not require the prom2teams config to be updated for each new team starts using a multi-tenant cluster or deployed for each team.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.