18 lines
576 B
YAML
18 lines
576 B
YAML
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: "{{ tg_bot_token }}"
|
|
chat_id: {{ tg_chat_id }}
|
|
|
|
# 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 |