LINUX.ORG.RU

История изменений

Исправление Garcia, (текущая версия) :

он даже на рабочий конфиг ошибки показывает

route:
    receiver: 'slack'

receivers:
    - name: 'slack'
      slack_configs:
          - send_resolved: true
            text: "{{ .CommonAnnotations.description }}"
            username: 'Prometheus'
            channel: '#prometheus'
            api_url: 'https://hooks.slack.com/services/myhook'

./promtool check config config.yml
Checking config.yml
  FAILED: parsing YAML file /root/docker/dockprom/alertmanager/config.yml: yaml: unmarshal errors:
  line 1: field route not found in type config.plain
  line 4: field receivers not found in type config.plain

Исходная версия Garcia, :

он даже на рабочий конфигурированиям ошибки показывает

route:
    receiver: 'slack'

receivers:
    - name: 'slack'
      slack_configs:
          - send_resolved: true
            text: "{{ .CommonAnnotations.description }}"
            username: 'Prometheus'
            channel: '#prometheus'
            api_url: 'https://hooks.slack.com/services/myhook'

./promtool check config config.yml
Checking config.yml
  FAILED: parsing YAML file /root/docker/dockprom/alertmanager/config.yml: yaml: unmarshal errors:
  line 1: field route not found in type config.plain
  line 4: field receivers not found in type config.plain