Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alert Manager not working on Slack #187

Closed
MiguelMedeiros opened this issue Sep 20, 2023 · 2 comments
Closed

Alert Manager not working on Slack #187

MiguelMedeiros opened this issue Sep 20, 2023 · 2 comments

Comments

@MiguelMedeiros
Copy link

I'm having troubles with alert manager using slack integration.
Idk what I'm doing wrong on the configuration file, it tells me that there is an error on line 5: line 5: did not find expected key
here is my configuration file:

route:
  receiver: 'slack'

receivers:
  - name: 'slack'
      slack_configs:
          - send_resolved: true
            username: 'Condor'
            channel: '#observability'
            api_url: 'https://hooks.slack.com/services/...'

Expected Behaviour

Send alerts on slack.

Current Behaviour

2023-09-20 08:19:37 ts=2023-09-20T11:19:37.671Z caller=main.go:245 level=info msg="Starting Alertmanager" version="(version=0.26.0, branch=HEAD, revision=d7b4f0c7322e7151d6e3b1e31cbc15361e295d8d)"
2023-09-20 08:19:37 ts=2023-09-20T11:19:37.671Z caller=main.go:246 level=info build_context="(go=go1.20.7, platform=linux/arm64, user=root@520df6c16a84, date=20230824-11:09:02, tags=netgo)"
2023-09-20 08:19:37 ts=2023-09-20T11:19:37.673Z caller=cluster.go:186 level=info component=cluster msg="setting advertise address explicitly" addr=172.20.0.6 port=9094
2023-09-20 08:19:37 ts=2023-09-20T11:19:37.675Z caller=cluster.go:683 level=info component=cluster msg="Waiting for gossip to settle..." interval=2s
2023-09-20 08:19:37 ts=2023-09-20T11:19:37.694Z caller=coordinator.go:113 level=info component=configuration msg="Loading configuration file" file=/etc/alertmanager/config.yml
2023-09-20 08:19:37 ts=2023-09-20T11:19:37.697Z caller=coordinator.go:118 level=error component=configuration msg="Loading configuration file failed" file=/etc/alertmanager/config.yml err="yaml: line 5: did not find expected key"
2023-09-20 08:19:37 ts=2023-09-20T11:19:37.697Z caller=cluster.go:692 level=info component=cluster msg="gossip not settled but continuing anyway" polls=0 elapsed=22.7575ms
@github-actions
Copy link

Awesome! Thanks for taking the time to open an issue. We will have a look and answer as soon as we can.' first issue

@MiguelMedeiros
Copy link
Author

Managed to make it work. The problema was with the indentation of the file alertmanager/config.yml. as soon as I fixed to 2 spaces it worked!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant