Sign inSign up

enmanuelmoreira/alertmanager-telegram

By enmanuelmoreira

•Updated almost 2 years ago

simple webhook notification relay for Prometheus Alertmanager

Image
Monitoring & observability
0

2.1K

enmanuelmoreira/alertmanager-telegram repository overview

⁠Alertmanager Telegram relay

A simple webhook notification relay for Prometheus Alertmanager.

⁠Running with Docker

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

⁠Templating

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

Tag summary

Content type

Image

Digest

sha256:7c0389003…

Size

56.1 MB

Last updated

almost 2 years ago

docker pull enmanuelmoreira/alertmanager-telegram:edge