Score:0

Alertmanager telegram config chat_id and cannot unmarshal errror

vn flag

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

Score:0
cn flag

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

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.