Skip to content
This repository has been archived by the owner on Aug 23, 2022. It is now read-only.

Alertmanager webhook to forward notifications to telegram

License

Notifications You must be signed in to change notification settings

pando85/alertmanager-telegram-forwarder

Repository files navigation

⚠️ This project is deprecated ⚠️

Alertmanager v0.24+ has Telegram support out of the box. Going forward, please simply use Alertmanager instead of this bot.

alertmanager-telegram-forwarder Build Status License

Alertmanager webhook to forward notifications to telegram using templates and based in OpenAPI specs.

Config

Env Description Default
API_SPECS_PATH OpenAPI specs path docs/api/v1/openapi.yaml
LOG_LEVEL Log level: [DEBUG, INFO, WARNING, ERROR, CRITICAL] INFO
TELEGRAM_BOT_TOKEN Telegram bot token ``
TEMPLATE_PATH Jinja2 template used to forward messages

Alertmanager

Must set up a webhook_config in alertmanager.yml. Replace {CHAT_ID} with a desired Telegram chat ID.

receivers:
- name: telegram
  webhook_configs:
  - send_resolved: true
    http_config: {}
    url: http://alertmanager-telegram-forwarder:8080/v1/alerts/{CHAT_ID}

You can contact with @myidbot to get your current chat ID.

Deployment