diff --git a/docs/configs/docsdev.js b/docs/configs/docsdev.js index 91fdafd148..60b038b3e7 100644 --- a/docs/configs/docsdev.js +++ b/docs/configs/docsdev.js @@ -328,6 +328,10 @@ export default { title: 'Feishu', link: '/en-us/docs/dev/user_doc/guide/alert/feishu.html', }, + { + title: 'Slack', + link: '/en-us/docs/dev/user_doc/guide/alert/slack.html', + }, ], }, { @@ -952,6 +956,10 @@ export default { title: '飞书告警', link: '/zh-cn/docs/dev/user_doc/guide/alert/feishu.html', }, + { + title: 'Slack告警', + link: '/zh-cn/docs/dev/user_doc/guide/alert/slack.html', + }, ], }, { diff --git a/docs/docs/en/guide/alert/slack.md b/docs/docs/en/guide/alert/slack.md new file mode 100644 index 0000000000..8d69e6f2a1 --- /dev/null +++ b/docs/docs/en/guide/alert/slack.md @@ -0,0 +1,47 @@ +# Slack + +If you need to use `Slack` for alerting, create an alert instance in the alert instance management and select +the `Slack` plugin. + +The following shows the `Slack` configuration example: + +![alert-slack](../../../../img/new_ui/dev/alert/alert_slack.png) + +## Parameter Configuration + +* Webhook + + > Copy the `Incoming Webhooks` address from the APP, check the image below: + + ![alert-slack-webhook](../../../../img/new_ui/dev/alert/alert_slack_webhook_addr.png) + +* UserName + + > (Deprecated) The sender name. Currently, Slack use APP as the sender name due to the Slack updates. + +## How to Get Webhook + +Please refer to the official article [Slack: Sending messages using Incoming Webhooks](https://api.slack.com/messaging/webhooks) to create new webhooks. + +### Create a new Slack APP + +Visit [Slack Official Website](https://api.slack.com/apps/new) and create a new APP. + +### Activate Incoming Webhooks Setting + +When finish creating a new APP, select `Incoming Webhooks` of the column `Feature` on the left of the APP page, and switch `Activate Incoming Webhooks` to `ON`. +![alert-slack-webhook](../../../../img/new_ui/dev/alert/alert_slack_enable.png) + +### Create a New Incoming Webhook + +Click `Add New Webhook to Workspace` and select a group to post messages. +![select-post-group](../../../../img/new_ui/dev/alert/alert_slack_new.png) + +### Acquire Incoming Webhooks Address + +Copy the `Incoming Webhooks` address to DolphinScheduler, check the image below: +The default format of the `Incoming Webhooks`: `https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX` + +![alert-slack-webhook](../../../../img/new_ui/dev/alert/alert_slack_webhook_addr.png) + +Reference:[Slack:Sending messages using Incoming Webhooks](https://api.slack.com/messaging/webhooks) diff --git a/docs/docs/zh/guide/alert/feishu.md b/docs/docs/zh/guide/alert/feishu.md index 6ac63a5229..496c1e8320 100644 --- a/docs/docs/zh/guide/alert/feishu.md +++ b/docs/docs/zh/guide/alert/feishu.md @@ -4,7 +4,7 @@ ![alert-feishu](../../../../img/new_ui/dev/alert/alert_feishu.png) -参数配置 +## 参数配置 * Webhook diff --git a/docs/docs/zh/guide/alert/slack.md b/docs/docs/zh/guide/alert/slack.md new file mode 100644 index 0000000000..97434b5cb5 --- /dev/null +++ b/docs/docs/zh/guide/alert/slack.md @@ -0,0 +1,44 @@ +# Slack + +如果您需要使用到Slack进行告警,请在告警实例管理里创建告警实例,选择 Slack 插件。Slack的配置样例如下: + +![alert-slack](../../../../img/new_ui/dev/alert/alert_slack.png) + +## 参数配置 + +* Webhook + + > 复制APP的`Incoming Webhooks`地址,如下图所示: + + ![alert-slack-webhook](../../../../img/new_ui/dev/alert/alert_slack_webhook_addr.png) + +* 用户名 + + > 发送人的昵称(已过时),由于Slack更新原因目前会使用APP名称作为发件人 + +## 如何获取Webhook地址 + +请参考官网文章[《Slack:如何通过Incoming Webhooks发送消息?》](https://api.slack.com/messaging/webhooks)进行创建。 + +### 新建一个Slack APP + +打开[Slack官网](https://api.slack.com/apps/new)新建一个APP。 + +### 激活Incoming Webhooks设置 + +新建APP后,在APP页面左侧,选择`Feature`栏目下的`Incoming Webhooks`,点击激活`Activate Incoming Webhooks`到`ON`。 +![alert-slack-webhook](../../../../img/new_ui/dev/alert/alert_slack_enable.png) + +### 创建一个Incoming Webhook + +创建一个新的`Incoming Webhook`,并选择消息的发送分组。 +![select-post-group](../../../../img/new_ui/dev/alert/alert_slack_new.png) + +### 获取Incoming Webhooks地址 + +复制APP的`Incoming Webhooks`地址,如下图所示: +`Incoming Webhooks`的格式为:`https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX` + +![alert-slack-webhook](../../../../img/new_ui/dev/alert/alert_slack_webhook_addr.png) + +参考:[Slack:如何通过Incoming Webhooks发送消息?](https://api.slack.com/messaging/webhooks) diff --git a/docs/img/new_ui/dev/alert/alert_slack.png b/docs/img/new_ui/dev/alert/alert_slack.png new file mode 100644 index 0000000000..c2dc35b6ea Binary files /dev/null and b/docs/img/new_ui/dev/alert/alert_slack.png differ diff --git a/docs/img/new_ui/dev/alert/alert_slack_enable.png b/docs/img/new_ui/dev/alert/alert_slack_enable.png new file mode 100644 index 0000000000..3b3ab2b643 Binary files /dev/null and b/docs/img/new_ui/dev/alert/alert_slack_enable.png differ diff --git a/docs/img/new_ui/dev/alert/alert_slack_new.png b/docs/img/new_ui/dev/alert/alert_slack_new.png new file mode 100644 index 0000000000..9bf9d5ffc0 Binary files /dev/null and b/docs/img/new_ui/dev/alert/alert_slack_new.png differ diff --git a/docs/img/new_ui/dev/alert/alert_slack_webhook_addr.png b/docs/img/new_ui/dev/alert/alert_slack_webhook_addr.png new file mode 100644 index 0000000000..00004f29b2 Binary files /dev/null and b/docs/img/new_ui/dev/alert/alert_slack_webhook_addr.png differ