simple webhook notification relay for Prometheus Alertmanager
2.1K
A simple webhook notification relay for Prometheus Alertmanager.
First, you'll need two environment variables:
TELEGRAM_CHAT_ID: Your Telegram user ID. Retrieve it from @userinfobot.TELEGRAM_TOKEN: An API token for a bot you created to send you the alert messages. Create one via @botfather.Next, provide the variables to the docker container:
docker run \
--name alertmanager-telegram \
-e TELEGRAM_CHAT_ID="..." \
-e TELEGRAM_TOKEN="..." \
-p 8080:8080 \
docker.io/enmanuelmoreira/alertmanager-telegram
Finally, in the Alertmanager config, add the relay as a webhook receiver:
receivers:
- name: "telegram"
webhook_configs:
- url: "http://alertmanager-telegram:8080/alerts"
send_resolved: true
A custom alert template can be added by overriding /templates/default.html:
docker run \
--name alertmanager-telegram \
-e TELEGRAM_CHAT_ID="..." \
-e TELEGRAM_TOKEN="..." \
-v /path/to/my/template.html:/templates/default.html \
-p 8080:8080 \
enmanuelmoreira/alertmanager-telegram
Content type
Image
Digest
sha256:7c0389003…
Size
56.1 MB
Last updated
almost 2 years ago
docker pull enmanuelmoreira/alertmanager-telegram:edge