Slack alerting not work

Log:

net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

I did the test via console using curl and it worked, only by Grafana 5.2.1 that does not work. With Grafana 4.6.3 it works.

Are you by any chance using a proxy? Please include details for the curl request you made, screenshot of your slack config in grafana and enable debug and include grafana server log.

I’m not using proxy because it works with script shell (curl) and Kapacitor (influxdata).

GRAFANA.LOG

t=2018-08-03T22:45:44+0000 lvl=dbug msg=“Sending notification” logger=alerting.notifier type=slack id=0 isDefault=false
t=2018-08-03T22:45:44+0000 lvl=info msg=“Executing slack notification” logger=alerting.notifier.slack ruleId=0 notification=SlackAlert
t=2018-08-03T22:45:44+0000 lvl=dbug msg=“Sending webhook” logger=notifications url=https://hooks.slack.com/services/###########/#############/############## http method=
t=2018-08-03T22:45:49+0000 lvl=dbug msg=“Session GC” logger=session
t=2018-08-03T22:45:50+0000 lvl=dbug msg=“Scheduling update” logger=alerting.scheduler ruleCount=18
t=2018-08-03T22:46:00+0000 lvl=dbug msg=“Scheduling update” logger=alerting.scheduler ruleCount=18
t=2018-08-03T22:46:01+0000 lvl=dbug msg=“Scheduler: Putting job on to exec queue” logger=alerting.scheduler name=“History alert” id=2
t=2018-08-03T22:46:14+0000 lvl=eror msg=“Failed to send slack notification” logger=alerting.notifier.slack error=“Post https://hooks.slack.com/services/###########/#############/##############: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)” webhook=SlackAlert
t=2018-08-03T22:46:14+0000 lvl=eror msg=“Failed to send alert notifications” logger=context userId=2 orgId=10 uname=alexeicm@br.ibm.com error=“Post https://hooks.slack.com/services/###########/#############/##############: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)”

[ ],
Alexei

Edit Channel Notification

Name: SlackAlert
Type: Slack
Send on all alerts: no check
Include image: no check
Url: https://hooks.slack.com/services/
Recipient: #…
Mention: blank
Token: blank

It works without problem for me using. If you’re using the Send test button on the alert nofification page - does that work?

Hi,

Sorry for the delay.

I was able to work, but I could not identify the problem.
Action taken:

  • I removed the rpm package in CentOS 7 (rpm -e grafana-5.2.2-1.x86_64)
  • I removed all the files and directories that I found through the command “find / -iname grafana”
  • I downloaded the latest available version (5.2.2) and installed it.

This was the first time I removed and installed. I have previously applied the new version overwriting the previous one (rpm -Uvh).

Thanks for listening.

hi i am facing same issue
msg=“Executing slack notification” logger=alerting.notifier.slack ruleId=0 notification=“SLACK ALERT”
t=2019-07-25T16:06:05+0530 lvl=eror msg=“Failed to send slack notification” logger=alerting.notifier.slack error=“Post https://hooks.slack.com/services/****/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)” webhook=“SLACK ALERT”

this is error in grafana logs ,

server using proxy , for which i used export http_proxy command
but still same error