Alertmanager webhook receiver that forwards alerts to a Telegram chat.
Python version: https://github.com/nopp/alertmanager-webhook-telegram-python
- Go 1.22+
- Telegram bot token (BotFather)
- Telegram chat ID (negative for groups, e.g.
-123456789)
All configuration is via environment variables — no hardcoded values.
| Variable | Required | Default | Description |
|---|---|---|---|
BOT_TOKEN |
✅ | — | Telegram bot token |
CHAT_ID |
✅ | — | Telegram chat ID (numeric) |
LISTEN_ADDR |
❌ | 0.0.0.0:9229 |
Address and port to bind |
docker build -f docker/Dockerfile -t alertmanager-webhook-telegram-go .
docker run -d \
-e BOT_TOKEN=your_bot_token \
-e CHAT_ID=-123456789 \
-p 9229:9229 \
alertmanager-webhook-telegram-gogo build -o webhook ./cmd/webhook
BOT_TOKEN=xxx CHAT_ID=-123456789 ./webhookgo test ./...receivers:
- name: telegram-webhook
webhook_configs:
- url: http://<host>:9229/alert
send_resolved: truecmd/webhook/ entry point
internal/config/ env var loading
internal/handler/ HTTP handler + Alertmanager types
internal/telegram/ Telegram bot client
docker/ Dockerfile
| Method | Path | Description |
|---|---|---|
| POST | /alert |
Receives Alertmanager webhook payload |