From be2ed11931bae26789a62352dd174f40b92faacb Mon Sep 17 00:00:00 2001 From: James Rodewig <40268737+jrodewig@users.noreply.github.com> Date: Tue, 24 Nov 2020 12:44:46 -0500 Subject: [PATCH] [DOCS] Fix obsolete Slack setup info (#57834) (#65447) Slack no longer recommends the legacy "integrations" setup (https://api.slack.com/legacy/custom-integrations/incoming-webhooks). Updated documentation to reference https://api.slack.com/messaging/webhooks instead. Removed screenshots from our documentation related to Slack setup. We should avoid these screenshots (and simply point to Slack documentation) for Slack may change the instructions/their UI in the future. Also added a short note on the use case of notifying multiple Slack channels. Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com> Co-authored-by: Lisa Cawley Co-authored-by: Elastic Machine --- x-pack/docs/en/watcher/actions/slack.asciidoc | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/x-pack/docs/en/watcher/actions/slack.asciidoc b/x-pack/docs/en/watcher/actions/slack.asciidoc index 74a8e2565ba..8ceb4698e16 100644 --- a/x-pack/docs/en/watcher/actions/slack.asciidoc +++ b/x-pack/docs/en/watcher/actions/slack.asciidoc @@ -181,20 +181,8 @@ aggregation and the Slack action: You configure the accounts {watcher} can use to communicate with Slack in the `xpack.notification.slack` namespace in `elasticsearch.yml`. -You need a https://api.slack.com/incoming-webhooks[Slack webhook URL] to -configure a Slack account. To create a webhook -URL, set up an an _Incoming Webhook Integration_ through the Slack console: - -. Log in to http://slack.com[slack.com] as a team administrator. -. Go to https://my.slack.com/services/new/incoming-webhook. -. Select a default channel for the integration. -+ -image::images/slack-add-webhook-integration.jpg[] -. Click *Add Incoming Webhook Integration*. -. Copy the generated webhook URL so you can paste it into your Slack account - configuration in `elasticsearch.yml`. -+ -image::images/slack-copy-webhook-url.jpg[] +You need a Slack App with the https://api.slack.com/messaging/webhooks[Incoming Webhooks feature] +to configure a Slack account. Use the generated webhook URL to set up your Slack account in {es}. To configure a Slack account, at a minimum you need to specify the account name and webhook URL in the {es} keystore (see {ref}/secure-settings.html[secure settings]): @@ -231,6 +219,9 @@ xpack.notification.slack: mrkdwn_in: "pretext, text" -------------------------------------------------- +To notify multiple channels, create a webhook URL for each channel in Slack +and multiple Slack accounts in {es} (one for each webhook URL). + If you configure multiple Slack accounts, you either need to configure a default account or specify which account the notification should be sent with in the <> action.