Skip to content

Conversation

@trensetim
Copy link

Preamble

Thank you, Prometheus-Team, for creating this cool software.
I want to contribute something back to the community, so I want to share my own alertmanager receiver implementation.

Architecture

alertmanager ---webhook---> [this app] ---REST---> Microsoft Graph API ---Mail---> Recipient

The app is a python/Flask web server that receives alertmanager webhooks and forwards them via SendMail to the recipients.

The reason for having this integration is that Alertmanager cannot authenticate SMTP using SASL/XOAuth (OAuth2) when connecting with the server. Thus, integration with modern enterprise mail servers (such as MS Exchange) is no longer possible using their default configuration (with disabled SMTP BasicAuth). This integration bridges that gap for EntraID+Exchange users.

Example usage

docker run --rm -it -p $PORT:$PORT \
    -e "[email protected],[email protected]" \
    -e "[email protected]" \
    -e "CLIENT_ID=prometheus" \
    -e "TENANT_ID=$TENANT_ID" \
    -e "CLIENT_SECRET=$CLIENT_SECRET" \
    -e "AUTH_TOKEN=$AUTH_TOKEN" \
    docker-registry.timtrense.com/tim/alertmanager-graphmail-forwarder:latest

@trensetim
Copy link
Author

image

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.

1 participant