kezhenxu94 commented on code in PR #11137:
URL: https://github.com/apache/skywalking/pull/11137#discussion_r1275968220


##########
docs/en/setup/backend/backend-alarm.md:
##########
@@ -152,7 +165,42 @@ Currently, metrics from the **Service**, **Service 
Instance**, **Endpoint**, **S
 
 Submit an issue or a pull request if you want to support any other scopes in 
Alarm.
 
-## Webhook
+## Hooks
+Hooks are a way to send alarm messages to the outside world. SkyWalking 
supports multiple hooks of the same type, each hook can support different 
configurations. 
+For example, you can configure two Slack hooks, one named `default` and set 
`is-global: true` means this hook will apply on all `Alarm Rules` **without 
config** `hooks`.
+Another named `custom1` will only apply on the `Alarm Rules` which **with 
config** `hooks` and include the name `slack.custom1`.
+
+```yaml
+hooks:
+  slackHooks:

Review Comment:
   ```suggestion
     slack:
   ```



##########
docs/en/setup/backend/backend-alarm.md:
##########
@@ -223,120 +271,134 @@ message KeyStringValuePair {
 }
 ```
 
-## Slack Chat Hook
+### Slack Chat
 Follow the [Getting Started with Incoming Webhooks 
guide](https://api.slack.com/messaging/webhooks) and create new Webhooks.
 
 The alarm message will be sent through HTTP post by `application/json` content 
type if you have configured Slack Incoming Webhooks as follows:
 ```yml
-slackHooks:
-  textTemplate: |-
-    {
-      "type": "section",
-      "text": {
-        "type": "mrkdwn",
-        "text": ":alarm_clock: *Apache Skywalking Alarm* \n **%s**."
+slack:
+  default:
+    is-global: true
+    text-template: |-
+      {
+        "type": "section",
+        "text": {
+          "type": "mrkdwn",
+          "text": ":alarm_clock: *Apache Skywalking Alarm* \n **%s**."
+        }
       }
-    }
-  webhooks:
+    webhooks:
     - https://hooks.slack.com/services/x/y/z
 ```
 
-## WeChat Hook
+### WeChat
 Note that only the WeChat Company Edition (WeCom) supports WebHooks. To use 
the WeChat WebHook, follow the [Wechat Webhooks 
guide](https://work.weixin.qq.com/help?doc_id=13376).
 The alarm message will be sent through HTTP post by `application/json` content 
type after you have set up Wechat Webhooks as follows:
 ```yml
-wechatHooks:
-  textTemplate: |-
-    {
-      "msgtype": "text",
-      "text": {
-        "content": "Apache SkyWalking Alarm: \n %s."
+wechat:
+  default:
+    is-global: true
+    text-template: |-
+      {
+        "msgtype": "text",
+        "text": {
+          "content": "Apache SkyWalking Alarm: \n %s."
+        }
       }
-    }
-  webhooks:
+    webhooks:
     - https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=dummy_key
 ```
 
-## DingTalk Hook
+### DingTalk
 Follow the [Dingtalk Webhooks 
guide](https://ding-doc.dingtalk.com/doc#/serverapi2/qf2nxq/uKPlK) and create 
new Webhooks.
 You can configure an optional secret for an individual webhook URL for 
security purposes.
 The alarm message will be sent through HTTP post by `application/json` content 
type if you have configured DingTalk Webhooks as follows:
 ```yml
-dingtalkHooks:
-  textTemplate: |-
-    {
-      "msgtype": "text",
-      "text": {
-        "content": "Apache SkyWalking Alarm: \n %s."
+dingtalk:
+  default:
+    is-global: true
+    text-template: |-
+      {
+        "msgtype": "text",
+        "text": {
+          "content": "Apache SkyWalking Alarm: \n %s."
+        }
       }
-    }
-  webhooks:
+    webhooks:
     - url: https://oapi.dingtalk.com/robot/send?access_token=dummy_token
       secret: dummysecret
 ```
 
-## Feishu Hook
+### Feishu
 Follow the [Feishu Webhooks 
guide](https://www.feishu.cn/hc/zh-cn/articles/360024984973) and create new 
Webhooks.
 You can configure an optional secret for an individual webhook URL for 
security purposes.
 If you want to direct a text to a user, you can configure `ats`, which is 
Feishu's user_id and separated by "," .
 The alarm message will be sent through HTTP post by `application/json` content 
type if you have configured Feishu Webhooks as follows:
 ```yml
-feishuHooks:
-  textTemplate: |-
+feishu:
+  default:
+    is-global: true
+    text-template: |-
     {
       "msg_type": "text",
       "content": {
         "text": "Apache SkyWalking Alarm: \n %s."
       },
       "ats":"feishu_user_id_1,feishu_user_id_2"
     }

Review Comment:
   ```suggestion
         {
           "msg_type": "text",
           "content": {
             "text": "Apache SkyWalking Alarm: \n %s."
           },
           "ats":"feishu_user_id_1,feishu_user_id_2"
         }
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to