Alertmanager: Loading configuration file failed: missing channel in Slack config

Created on 24 Dec 2015  Â·  12Comments  Â·  Source: prometheus/alertmanager

I run the alertmanager:v0.1 beta with docker.
And get the error

Notify for 1 alerts failed: notifier \"alertmanager_test\" does not exist

Most helpful comment

The YAML is wrong. No dash in front of every object item but only in front of the first one.

global:
  slack_api_url: "https://hooks.slack.com/services/xx?channel=xx"
route:
  group_wait: 10s
  group_interval: 10s
  repeat_interval: 10s
  receiver: alertmanager_test
receivers:
  - name: alertmanager_test
    slack_configs:
    - webhook_url: 'https://hooks.slack.com/services/xx'
      channel: '#xx'

All 12 comments

image

alertmanager.yml

global:
  slack_api_url: "https://hooks.slack.com/services/xxxI?channel=xxx"

route:
  group_wait: 10s
  group_interval: 10s
  repeat_interval: 10s
  receiver: alertmanager_test

remove the

 receiver: alertmanager_test

from alertmanager.yml
get the error

Notify for 1 alerts failed: notifier \"\" does not exist

so I edit alertmanager.yml

global:
  slack_api_url: "https://hooks.slack.com/services/xx?channel=xx"
route:
  group_wait: 10s
  group_interval: 10s
  repeat_interval: 10s
  receiver: alertmanager_test
receivers:
  - name: alertmanager_test
    slack_configs:
    - webhook_url: 'https://hooks.slack.com/services/xx'
    - channel: '#xx'

But still get the error

Loading configuration file failed: missing channel in Slack config

what should I do

@fabxc
image

@brian-brazil

did anyone figure this out?
im getting the same thing, with slack and pegerduty key

The YAML is wrong. No dash in front of every object item but only in front of the first one.

global:
  slack_api_url: "https://hooks.slack.com/services/xx?channel=xx"
route:
  group_wait: 10s
  group_interval: 10s
  repeat_interval: 10s
  receiver: alertmanager_test
receivers:
  - name: alertmanager_test
    slack_configs:
    - webhook_url: 'https://hooks.slack.com/services/xx'
      channel: '#xx'

that just gives a:

time="2016-01-20T20:26:34Z" level=error msg="Loading configuration file failed: unknown fields in slack config: webhook_url" file="/alertmanager/config.yml" source="main.go:128"

Should be 'slack_api_url' [1] or 'api_url' [2]

Nicholas

[1]
https://github.com/prometheus/docs/blob/amdoc/content/docs/alerting/configuration.md#configuration-file

[2]
https://github.com/prometheus/docs/blob/amdoc/content/docs/alerting/configuration.md#slack-receiver-slack_config

On Wed, Jan 20, 2016 at 2:26 PM Daniel Ben Yosef [email protected]
wrote:

that just gives a:

time="2016-01-20T20:26:34Z" level=error msg="Loading configuration file
failed: unknown fields in slack config: webhook_url"
file="/alertmanager/config.yml" source="main.go:128"

—
Reply to this email directly or view it on GitHub
https://github.com/prometheus/alertmanager/issues/203#issuecomment-173349654
.

Thanks!

The url is bad. Do those github directories still exist?

Was this page helpful?
0 / 5 - 0 ratings