All Products
Search
Document Center

CloudMonitor:Enable an alert contact to receive alert notifications in a Lark group

Last Updated:May 22, 2023

To enable an alert contact to receive alert notifications in a Lark group, you must add the webhook URL of a Lark chatbot to the alert contact and configure an alert rule. Then, if the alert rule is triggered, the alert contact can receive alert notifications in the Lark group.

Prerequisites

An alert contact is created. For more information, see Create an alert contact or alert contact group.

Step 1: Create a Lark chatbot

The following procedure describes how to create a chatbot in Lark for PC.

  1. Start Lark for PC and go to the Lark group to which the alert contact belongs.

  2. Click the Settings icon in the lower-right corner.

  3. Click Add Bot.

  4. Click Add next to Custom Bot.

  5. Enter a chatbot name, for example, CloudMonitor alert notifications. Then, click Add.

  6. Click Copy to copy the webhook URL.

  7. Select Custom Keywords and add the following keywords: CloudMonitor, Cloud Service, Monitor, ECS, and Alert.

  8. Click Finish.

Step 2: Add the webhook URL of the Lark chatbot to the alert contact

Add the webhook URL of the Lark chatbot to the alert contact.

  1. Log on to the CloudMonitor console.
  2. In the left-side navigation pane, choose Alerts > Alert Contacts.

  3. On the Alert Contacts tab, find the alert contact that you want to modify and click Edit in the Actions column.

  4. In the Set Alert Contact panel, enter the webhook URL of the Lark chatbot.

    To test the connectivity of an alert callback URL, perform the following steps:
    1. Click Test next to the the callback URL.
      In the WebHook test panel, you can check and troubleshoot the connectivity of the alert callback URL based on the returned status code and test result details.
      Note To obtain the details of the test result, configure the Template Type and Language parameters and click Test.
    2. Click Close.
  5. Confirm the parameter values and click OK.

Step 3: Create an alert contact group

Add the alert contact to an alert contact group.

  1. Log on to the CloudMonitor console.
  2. In the left-side navigation pane, choose Alerts > Alert Contacts.

  3. Click the Alert Contact Group tab.

  4. On the Alert Contact Group tab, click Create Alert Contact Group.

  5. In the Create Alert Contact Group panel, enter a name for the alert contact group and add the alert contact to the group.

  6. Click Confirm.

Step 4: Create an alert rule

Set an alert condition for the metrics of the resource and select an alert contact group.

For more information about how to create an alert rule, see Create an alert rule.

Step 5: View alert notifications

If a metric meets the specified condition in the alert rule, the Lark group receives an alert notification.

Lark alert notifications