0

I am trying to configure alertmanager to send alerts to my telegram group. Following the configuration I have:

global:
  resolve_timeout: 5m
route:
  group_by:
  - job
  group_interval: 5m
  group_wait: 30s
  receiver: "telegram"
  repeat_interval: 1d
  routes:
  - match:
      alertname: Watchdog
    receiver: "null"
receivers:
- name: "null"
- name: 'telegram'
  telegram_configs:
  - bot_token: '5_REDACTED' 
    chat_id: '-1234567'
templates:
- /etc/alertmanager/config/*.tmpl

The problem is that the container crashloopback with ts=2022-05-01T22:06:11.142Z caller=coordinator.go:118 level=error component=configuration msg="Loading configuration file failed" file=/etc/alertmanager/config/alertmanager.yaml err="yaml: unmarshal errors:\n line 26: cannot unmarshal !!str {{ -123... into int64"

How can I fix this? I have tried add single quotes and double quotes but I still get the same errors

Jose
  • 11
  • 2

1 Answers1

1

chat_id: -1234567 - without quotes, hyphen isn't a problem
And add
parse_mode: 'HTML'
Parsing markdown is used by default, but in the current version (0.24) many users are seeing problems with this

Bora2k3
  • 11
  • 2