Add a WeCom chatbot webhook URL to an alert contact so that alert notifications are sent to a WeCom group when a metric triggers an alert.
Prerequisites
An alert contact is created. Create an alert contact or an alert contact group.
Step 1: Create a WeCom chatbot
The following steps use the WeCom mobile app.
-
In the WeCom mobile app, open the group where you want to receive alert notifications.
-
Tap the
icon in the upper-right corner. -
Tap the
icon next to Group Robots. -
Tap Add Robot.
-
Tap New.
-
Enter a chatbot name, such as
Cloud Monitor alert notifications. -
Tap Add.
-
Tap Copy to copy the URL.
Step 2: Add the chatbot to an alert contact
-
Log on to the Cloud Monitor console.
-
In the left-side navigation pane, choose .
-
On the Alert Contacts tab, find the alert contact and click Edit in the Actions column.
-
In the Set Alert Contact panel, enter the webhook URL of the WeCom chatbot.
To test connectivity to the callback URL:
-
Click Test, located directly to the right of the callback URL.
In the WebHook Test panel, check the HTTP status code and test result details to verify connectivity.
NoteYou can also set the Test Template Type: and Language:. Then click Test again to view updated test results.
-
Click Close.
-
-
Verify the information and click Confirm.
Step 3: Create an alert contact group
-
Log on to the Cloud Monitor console.
-
In the left-side navigation pane, choose .
-
Click the Alert Contact Group tab.
-
On the Alert Contact Group tab, click Create Contact Group.
-
In the Create Contact Group panel, enter a group name and select the alert contact.
-
Click Confirm.
Step 4: Create an alert rule
Set an alert condition for the metrics of a resource and select the alert contact group.
See Create an alert rule for more information.
Step 5: View alert notifications
When a metric triggers an alert, the WeCom group receives a notification.