This bot is designed to alert messages from alertmanager.
export GOPATH="your go path"
make clean
make-
Specify telegram token in
config.yaml:telegram_token: "token goes here"
-
Run
telegram_bot. Seeprometheus_bot --helpfor command line options -
Add your bot to a group. It should report group id now
Here's the receivers part of the alertmanager configuration file:
- name: 'admins'
webhook_configs:
- send_resolved: True
url: http://127.0.0.1:9087/alert/-chat_idReplace -chat_id with the number you got from your bot, with -. To use multiple chats just add more receivers.
For test your instance, you must only export TELEGRAM_CHATID environment variable
export TELEGRAM_CHATID="-YOUR TELEGRAM CHAT ID"
make test