Following on from the documentation and answers to similar questions here, I've created a Slack app with a bot user and connected it to my public channel in Slack. I've also invited the bot user and gave it files:write:user OAuth Scope. After all this, I reinstalled the app to apply the changes.
My configuration in Grafana has:
- Include image ticked
- The correct webhook URL from Slack
- Recipient contains my channel name
- My bot token
The Send Test works fine, even in private channels. I first receive a notification from the app and then a pretty image from the bot user. From the Javascript console, my Grafana version is 5.0.3. I've repeated this process several times with no luck. The only I can imagine is that I'm not an Admin but then I wouldn't have expected the test to work.
I've also looked through the Grafana log files and it seems to come from Grafana's side; specifically, it has trouble rendering the image.
lvl=info msg="New state change" logger=alerting.resultHandler alertId=1 newState=ok prev state=alerting
lvl=info msg=Rendering logger=png-renderer path="somepath?panelId=11111"
lvl=eror msg="failed to render an image" logger=png-renderer error="exit status 127"
lvl=info msg=uploaded logger=alerting.notifier url=
lvl=info msg="Executing slack notification" logger=alerting.notifier.slack ruleId=6 notification="myalert"
lvl=info msg="Uploading to slack via file.upload API" logger=alerting.notifier.slack
lvl=info msg="Request Completed" logger=context userId=1111 orgId=1111 uname= method=GET path=/ status=302 remote_addr=000.111.222.333 time_ms=0 size=29 referer=