I’ve setup a notification channel using Slack and while it is working well, I’d like to use the option to include the image.
My grafana server is not available from the internet, so I’ve added a Slack bot token so it can use the upload API and include the image, however, this isn’t working.
I have the same issue. (although I don’t get an error message when I test the alert).
The grafana log says:
t=2017-12-02T10:11:15-0600 lvl=info msg=“Sending notification” logger=alerting.notifier type=slack id=0 isDefault=false
t=2017-12-02T10:11:15-0600 lvl=info msg=“Executing slack notification” logger=alerting.notifier.slack ruleId=0 notification=SlackChan
nel
t=2017-12-02T10:11:15-0600 lvl=info msg=“Uploading to slack via file.upload API” logger=alerting.notifier.slack
but no image is shown.
I’m not sure whether the issue is caused by the slack bot setup or by grafana.
I just found out what was wrong:
For the alert messages, the incoming-webhook had a default channel, that’s why I didn’t specify the “Recipient” in the grafana slack configuration.
For the bot to work, I simply had to specify the channel you want to post the images in, because it doesn’t ‘know’ about the webhook default settings…
Hope that helps you, too.
I’ve tried this solution. I setup a Slack app with a bot user and an incoming webhook, specified the recipient and token from the app’s bot config. I’m getting the images but they are showing up in a second post from the alert.
What am I missing here to get this all in a single post?
Good day,
I configured the slack notification channel via webhook however whenever there is an alert, my bot keeps uploading the same image which is used in the test notification. What could be causing this?
…
If you are using the token for a slack bot, then you have to invite the bot to the channel you want to send notifications and add the channel to the recipient field.
…
I found if you use slack bot user to send a snapshot image, it will send in separated post.
For sending image and message in a single post, you have to configure external image storage for Grafana like s3, etc…
OK - I have the same issue, I get the alert but no image. New install with Grafana 6.7.0. I am posting using the Slack bot config. Grafana is running in a Docker container.