2023-02-24 17:55:21 +00:00
|
|
|
route:
|
|
|
|
receiver: 'telegram'
|
|
|
|
routes:
|
|
|
|
# All alerts with severity=warning or severity=critical
|
|
|
|
# are dispatched to the telegram receiver.
|
|
|
|
- receiver: 'telegram'
|
|
|
|
group_wait: 10s
|
|
|
|
matchers:
|
|
|
|
- severity=~"warning|critical"
|
|
|
|
|
|
|
|
receivers:
|
|
|
|
- name: 'telegram'
|
|
|
|
telegram_configs:
|
|
|
|
- bot_token: "00000:ddddddddddddddddddd"
|
2023-02-26 16:12:02 +00:00
|
|
|
chat_id: -3453435345
|
2023-02-24 17:55:21 +00:00
|
|
|
|
|
|
|
# https://api.telegram.org/botINSERT_BOT_ID_HERE/getUpdates - to get chat_id
|
|
|
|
# amtool --alertmanager.url=http://localhost:9093/ alert add alertname="Test alert" severity="warning" job="test-job" - to send test alert
|