Commit e69dd553 authored by Pedro Eduardo Trujillo's avatar Pedro Eduardo Trujillo
Browse files

Corrige config, añade parser vacío por defecto

Para que Telegram funcione correctamente, se deja por defecto su parser
con valor de cadena vacía, para tratar los mensajes como texto plano en
lugar de formatearlos como HTML (por defecto).
parent b3d54c26
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@ SLACK_USER=alertmanager

TELEGRAM_BOT_TOKEN=changeme
TELEGRAM_CHAT_ID=123
TELEGRAM_PARSE_MODE=
TELEGRAM_DISABLE_NOTIFICATIONS=false

TRAEFIK_SUBDOMAIN=alertmanager
+1 −0
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@ services:
      SLACK_USER:
      TELEGRAM_BOT_TOKEN:
      TELEGRAM_CHAT_ID:
      TELEGRAM_PARSE_MODE:
      TELEGRAM_DISABLE_NOTIFICATIONS:
    networks:
      metric-net:
+4 −3
Original line number Diff line number Diff line
@@ -8,7 +8,6 @@ route:

receivers:
  - name: 'slack'
    continue: true
    slack_configs:
      - send_resolved: true
        text: '{{ .CommonAnnotations.description }}'
@@ -16,9 +15,11 @@ receivers:
        channel: '${SLACK_CHANNEL}'
        api_url: '${SLACK_URL}'
  - name: 'telegram'
    continue: true
    telegram_configs:
      - bot_token: '${TELEGRAM_BOT_TOKEN}'
      - send_resolved: true
        api_url: https://api.telegram.org
        bot_token: '${TELEGRAM_BOT_TOKEN}'
        chat_id: ${TELEGRAM_CHAT_ID}
        message: '{{ .CommonAnnotations.description }}'
        parse_mode: '${TELEGRAM_PARSE_MODE}'
        disable_notifications: ${TELEGRAM_DISABLE_NOTIFICATIONS}
+1 −0
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@ cat ${CONFIG_PATH}/alertmanager-tmpl.yml \
	| sed "s@\${TELEGRAM_CHAT_ID}@${TELEGRAM_CHAT_ID}@g" \
	| sed "s@\${TELEGRAM_BOT_TOKEN}@${TELEGRAM_BOT_TOKEN}@g" \
	| sed "s@\${TELEGRAM_MESSAGE_TEMPLATE}@${TELEGRAM_MESSAGE_TEMPLATE}@g" \
	| sed "s@\${TELEGRAM_PARSE_MODE}@${TELEGRAM_PARSE_MODE}@g" \
	| sed "s@\${TELEGRAM_DISABLE_NOTIFICATIONS}@${TELEGRAM_DISABLE_NOTIFICATIONS}@g" \
	> ${CONFIG_PATH}/alertmanager.yml