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

Integra expresiones para mensajes en config

No es posible pasar dichos valores mediante entorno, da problemas de
parseo de texto. Además, tampoco aporta demasiado aislarlo en variables,
ya que se trata de una config que puede ser actualizada a voluntad.
parent 33a6ee04
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -4,11 +4,9 @@ DATA_PATH=/alertmanager
SLACK_URL=https://hooks.slack.com/services/TOKEN
SLACK_CHANNEL=#general
SLACK_USER=alertmanager
SLACK_TEXT_TEMPLATE={{ .CommonAnnotations.description }}

TELEGRAM_BOT_TOKEN=changeme
TELEGRAM_CHAT_ID=123
TELEGRAM_MESSAGE_TEMPLATE={{ template "telegram.default.message" .}}
TELEGRAM_DISABLE_NOTIFICATIONS=false

TRAEFIK_SUBDOMAIN=alertmanager
+2 −2
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@ receivers:
  - name: 'slack'
    slack_configs:
      - send_resolved: true
        text: '${SLACK_TEXT_TEMPLATE}'
        text: '{{ .CommonAnnotations.description }}'
        username: '${SLACK_USER}'
        channel: '${SLACK_CHANNEL}'
        api_url: '${SLACK_URL}'
@@ -16,5 +16,5 @@ receivers:
    telegram_configs:
      - bot_token: '${TELEGRAM_BOT_TOKEN}'
        chat_id: '${TELEGRAM_CHAT_ID}'
        message: '${TELEGRAM_MESSAGE_TEMPLATE}'
        message: '{{ template "telegram.default.message" .}}'
        disable_notifications: '${TELEGRAM_DISABLE_NOTIFICATIONS}'
+0 −2
Original line number Diff line number Diff line
@@ -13,10 +13,8 @@ services:
      SLACK_URL:
      SLACK_CHANNEL:
      SLACK_USER:
      SLACK_TEXT_TEMPLATE:
      TELEGRAM_BOT_TOKEN:
      TELEGRAM_CHAT_ID:
      TELEGRAM_MESSAGE_TEMPLATE:
      TELEGRAM_DISABLE_NOTIFICATIONS:
    networks:
      metric-net: