Reputation: 834
I set up a Slack notification channel in Grafana using a webhook as URL.
When I click "Send Test" I see this notification in my Slack channel:
However ordinary notifications are shown without images. I read Grafana's docs, but apparently I haven't understood it.
If you want to include screenshots of the firing alerts in the slack messages you have to configure either the external image destination in Grafana, or a bot integration via Slack Apps. Follow Slack’s guide to set up a bot integration and use the token provided https://api.slack.com/bot-users, which starts with “xoxb”.
Can someone guide me through it? I created a new bot and generated a token for it (starts with xoxb as requested) but how do I keep going from there?
Upvotes: 3
Views: 7781
Reputation: 1
It wasn't mentioned by OP but if your target Slack channel is a private channel, you'll also need to ensure that you've added the bot to the private channel so that it is able upload an image to it.
You can do this by viewing the channel's details, clicking "More" and then "Add apps". On the screen that shows up, you should be able to search for the bot that you created and click the "Add" button aside it.
Good luck!
Upvotes: 0
Reputation: 38962
Go to <grafana_host>/alerting/notification/new
(or click the top-left Menu icon, select "Alerting", select "Notification Channels", click the green "New Channel" button). You should get the page in the screenshot below.
Do the following steps:
Slack
.And voila!
Update
Ability to configure a Slack token was added in Grafana version 4.6.0
Upvotes: 0