diff --git a/CHANGELOG.md b/CHANGELOG.md
index cd78af1d4fa..5eb97119490 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,7 @@
# 6.7.0 (unreleased)
## Breaking changes
+* **Slack**: Removed _Mention_ setting and instead introduce _Mention Users_, _Mention Groups_, and _Mention Channel_. The first two settings require user and group IDs, respectively. This change was necessary because the way of mentioning via the Slack API [changed](https://api.slack.com/changelog/2017-09-the-one-about-usernames) and mentions in Slack notifications no longer worked.
### Notice about changes in backendSrv for plugin authors
diff --git a/docs/sources/administration/provisioning.md b/docs/sources/administration/provisioning.md
index 151683dc5c0..f7b740fb315 100755
--- a/docs/sources/administration/provisioning.md
+++ b/docs/sources/administration/provisioning.md
@@ -351,7 +351,9 @@ The following sections detail the supported settings for each alert notification
| icon_emoji |
| icon_url |
| uploadImage |
-| mention |
+| mentionUsers |
+| mentionGroups |
+| mentionChannel |
| token |
#### Alert notification `victorops`
diff --git a/docs/sources/alerting/notifications.md b/docs/sources/alerting/notifications.md
index 69708e917b3..5ea13a685aa 100644
--- a/docs/sources/alerting/notifications.md
+++ b/docs/sources/alerting/notifications.md
@@ -75,20 +75,22 @@ able to access the image.
{{< imgbox max-width="40%" img="/img/docs/v4/slack_notification.png" caption="Alerting Slack Notification" >}}
-To set up slack you need to configure an incoming webhook url at slack. You can follow their guide on how
-to do that [here](https://api.slack.com/incoming-webhooks). If you want to include screenshots of the firing alerts
-in the Slack messages you have to configure either the [external image destination](#external-image-store) 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".
+To set up Slack, you need to configure an incoming Slack webhook URL. You can follow
+[their guide](https://api.slack.com/incoming-webhooks) on how to do that. If you want to include screenshots of the
+firing alerts in the Slack messages you have to configure either the [external image destination](#external-image-store)
+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".
Setting | Description
---------- | -----------
-Url | Slack incoming webhook url.
+Url | Slack incoming webhook URL.
Username | Set the username for the bot's message.
Recipient | Allows you to override the Slack recipient.
Icon emoji | Provide an emoji to use as the icon for the bot's message. Ex :smile:
Icon URL | Provide a url to an image to use as the icon for the bot's message.
-Mention | make it possible to include a mention in the Slack notification sent by Grafana. Ex @here or @channel
+Mention Users | Optionally mention one or more users in the Slack notification sent by Grafana. You have to refer to users, comma-separated, via their corresponding Slack IDs (which you can find by clicking the overflow button on each user's Slack profile).
+Mention Groups | Optionally mention one or more groups in the Slack notification sent by Grafana. You have to refer to groups, comma-separated, via their corresponding Slack IDs (which you can get from each group's Slack profile URL).
+Mention Channel | Optionally mention either all channel members or just active ones.
Token | If provided, Grafana will upload the generated image via Slack's file.upload API method, not the external image destination.
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.
diff --git a/pkg/services/alerting/notifiers/slack.go b/pkg/services/alerting/notifiers/slack.go
index f86314d0726..199ac565d88 100644
--- a/pkg/services/alerting/notifiers/slack.go
+++ b/pkg/services/alerting/notifiers/slack.go
@@ -3,10 +3,12 @@ package notifiers
import (
"bytes"
"encoding/json"
+ "fmt"
"io"
"mime/multipart"
"os"
"path/filepath"
+ "strings"
"time"
"github.com/grafana/grafana/pkg/bus"
@@ -25,11 +27,11 @@ func init() {
OptionsTemplate: `
Slack settings
- Url
+ Url
- Recipient
+ Recipient
- Username
+ Username
- Icon emoji
+ Icon emoji
- Icon URL
+ Icon URL
- Mention
+ Mention Users
- Mention a user or a group using @ when notifying in a channel
+ Mention one or more users (comma separated) when notifying in a channel, by ID (you can copy this from the user's Slack profile)
- Token
+ Mention Groups
+
+
+
+ Mention one or more groups (comma separated) when notifying in a channel (you can copy this from the group's Slack profile URL)
+
+
+
+ Mention Channel
+
+
+ Mention whole channel or just active members when notifying
+
+
+
+ Token
- Provide a bot token to use the Slack file.upload API (starts with "xoxb"). Specify #channel-name or @username in Recipient for this to work
+ Provide a bot token to use the Slack file.upload API (starts with "xoxb"). Specify #channel-name or @username in Recipient for this to work