From e1e59925cc7a4a953c7deba7fdb215224ed05fdb Mon Sep 17 00:00:00 2001 From: George Robinson Date: Thu, 10 Aug 2023 11:02:12 +0100 Subject: [PATCH] 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 --- docs/configuration.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/configuration.md b/docs/configuration.md index 99aa8abd..c81a26e1 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -951,9 +951,13 @@ token_file: ### `` -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.