Alertmanager v0.24+ has Telegram support out of the box. Going forward, please simply use Alertmanager instead of this bot.
Alertmanager webhook to forward notifications to telegram using templates and based in OpenAPI specs.
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 |
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.