Update docs for slack_config (#3455)

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>
This commit is contained in:
George Robinson 2023-08-10 11:02:12 +01:00 committed by GitHub
parent 94625df2b2
commit e1e59925cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 3 deletions

View File

@ -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.