Alertmanager to slack not working

30 views
Skip to first unread message

kiran

unread,
Aug 11, 2020, 9:36:59 PM8/11/20
to promethe...@googlegroups.com
Please help. I am trying to setup alertmanager with prometheus and alerts to be sent to slack.
But somehow I am not receiving anything in slack.
I have verified that alerts are firing by going to http://localhost:9090/alerts and I see alerts firing. I also checked separately if slack webhook is working using the CURL command provided by slack when I signed up for webhook and I am receiving messages. I also verified if YAML files are in valid format using yamllint.com as well.
I am attaching the config files(alertmanager section of prometheus.yml, alertmanager.yml, host.rules file).


1597195919292_regional_screenshot.png
1597195960142_regional_screenshot.png
1597195818586_regional_screenshot.png

Brian Candler

unread,
Aug 12, 2020, 2:12:43 AM8/12/20
to Prometheus Users
Your alertmanager config is broken.  "receivers" needs to be a list, as does slack_configs, and the settings need to be indented. I doubt you're even able to start alertmanager with that config.

You posted images rather than text, so I can't copy-paste your config to fix it, but here's a different one showing the required formatting:

receivers:
- name: brian
  email_configs:
    send_resolved: true

kiran

unread,
Aug 12, 2020, 8:27:18 AM8/12/20
to Brian Candler, Prometheus Users
Thank you, Brian.
I started from scratch and used the alertmanager.yml from this link:
I see its firing but not receiving on slack. Is there any log file for alert manager to debug?
I am attaching as text file my alertmanager.yml


--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/0ff69689-ff65-44c7-a717-dc696dd14846o%40googlegroups.com.
alertmanager.yml

Brian Candler

unread,
Aug 12, 2020, 9:37:56 AM8/12/20
to Prometheus Users
It logs to stdout/stderr.  If you're running alertmanager under systemd then try "journalctl -eu alertmanager".  Or simply stop it, and then run it in the foreground in a terminal.
Reply all
Reply to author
Forward
0 new messages