Notification not fwd from alertmanager to slack

31 views
Skip to first unread message

Pravin S

unread,
May 12, 2020, 3:34:13 AM5/12/20
to promethe...@googlegroups.com
Hi, 

I am experiencing issues with alertmanager, notification are not getting forwarded to slack.

Upon shutdown of mysql instance, I can see the instance down alert on Prometheus -> firing section and at the same time,its getting appeared on alertmanager.

Even I am able to see the data output on alertmanager "http://localhost:9093/api/v1/alerts" when instance was shutdown but still notification not getting fwd to slack.  Alertmanager config output  has loaded the alertmanager.yml and picked the slack channel name but didn't send the alert.  

I tried to send the alert manually from the host where alertmanager running  and it ls able to send the alert to slack so ruled out the firewall issue.

Any idea ?

Thanks 
Pravin 

Brian Candler

unread,
May 12, 2020, 4:16:22 AM5/12/20
to Prometheus Users
You added a "routes" section containing a route with no receiver.  This says: "if the alert is InstanceDown and the service is database, then don't send any alert".  Only alerts which *don't* match this condition will fall through to the default receiver.

Try removing the "routes" section entirely to start with - then all alerts should go to your default receiver.  After that, you can introduce routes as and when you require, to direct specific alerts to specific destinations.

piyush sharma

unread,
May 12, 2020, 5:34:35 AM5/12/20
to Pravin S, Prometheus Users
Your alertmanager configuration for slack integration is not correct.

It doesn't have slack webhook url.
You have to create an incoming webhook on slack. And mention that in alertmanager configuration

--
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/CAJEyFn42AZVU_F5GpjowXHrCsBrqDnvkV1xYFUrGg1NK6kDcaA%40mail.gmail.com.

Pravin S

unread,
May 12, 2020, 6:12:54 AM5/12/20
to Prometheus Users

Hi Brian/ Piyush

Below are the configuration that I have in alertmanager.yml,   not sure why alertmanager still not sending the messages to slack.  I already have slack webhook url added in alertmanager and removes the routes section, still no luck.



On Tuesday, May 12, 2020 at 10:34:35 AM UTC+1, piyush sharma wrote:
Your alertmanager configuration for slack integration is not correct.

It doesn't have slack webhook url.
You have to create an incoming webhook on slack. And mention that in alertmanager configuration

On Tue, 12 May, 2020, 1:04 pm Pravin S, <pks...@gmail.com> wrote:
Hi, 

I am experiencing issues with alertmanager, notification are not getting forwarded to slack.

Upon shutdown of mysql instance, I can see the instance down alert on Prometheus -> firing section and at the same time,its getting appeared on alertmanager.

Even I am able to see the data output on alertmanager "http://localhost:9093/api/v1/alerts" when instance was shutdown but still notification not getting fwd to slack.  Alertmanager config output  has loaded the alertmanager.yml and picked the slack channel name but didn't send the alert.  

I tried to send the alert manually from the host where alertmanager running  and it ls able to send the alert to slack so ruled out the firewall issue.

Any idea ?

Thanks 
Pravin 

--
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 promethe...@googlegroups.com.

Pravin S

unread,
May 12, 2020, 5:25:02 PM5/12/20
to Prometheus Users
Issue  resolved 
Issue got resolved by adding the following parameter to alertmanager.yml

http_config:
   proxy_url=your_proxy

It was firewall issue.  Adding the proxy  server at host level doesn't work.

The above solution may be helpful to someone struggling with notifications not being sent from alertmanager to slack/email/pagerduty.

Thanks
Pravin

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/db2e709c-1ba9-47e9-b37e-9437a3a8bb99%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages