Skip to content

Commit

Permalink
Update docs for slack_config
Browse files Browse the repository at this point in the history
This commit updates the docs for slack_config with usage for both
Incoming webhooks and Bot tokens.

Signed-off-by: George Robinson <george.robinson@grafana.com>
  • Loading branch information
grobinson-grafana committed Aug 10, 2023
1 parent 16cb095 commit 193370d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions docs/configuration.md
Expand Up @@ -951,9 +951,13 @@ token_file: <filepath>

### `<slack_config>`

Slack notifications are sent via [Slack
webhooks](https://api.slack.com/messaging/webhooks). The notification contains
an [attachment](https://api.slack.com/messaging/composing/layouts#attachments).
Slack notifications can be sent via [Incoming webhooks](https://api.slack.com/messaging/webhooks) or [Bot tokens](https://api.slack.com/authentication/token-types).

If using an incoming webhook then `api_url` must be set to the URL of the incoming webhook, or written to the file referenced in `api_url_file`.

If using Bot tokens then `api_url` must be set to [`https://slack.com/api/chat.postMessage`](https://api.slack.com/methods/chat.postMessage), the bot token must be set as the authorization credentials in `http_config`, and `channel` must contain either the name of the channel or Channel ID to send notifications to. If using the name of the channel the # is optional.

The notification contains an [attachment](https://api.slack.com/messaging/composing/layouts#attachments).

```yaml
# Whether to notify about resolved alerts.
Expand Down

0 comments on commit 193370d

Please sign in to comment.