To enable an alert contact to receive alert notifications in a DingTalk group, you must add the webhook URL of a DingTalk 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 DingTalk group.
Prerequisites
An alert contact is created. For more information, see Create an alert contact or alert contact group.
Step 1: Create a DingTalk chatbot
For more information about how to create a DingTalk chatbot, see Steps 1, 3, 4, 5, and 6 in Create a DingTalk chatbot.
NoteStarting from 00:00:00 on September 1, 2023, non-enterprise DingTalk groups no longer support custom chatbots. Existing custom chatbots are not affected.
When you create a chatbot, add keywords one by one, including Monitor, ECS, and Alert.
The DingTalk chatbot webhook feature had been gradually commercialized from January 1, 2024, and was fully commercialized on February 1. DingTalk provides 5,000 calls free of charge per calendar month. For more information, see Announcement of commercialization of Webhook and Stream.
In the DingTalk application center, you can activate Alibaba Cloud Mini Program to obtain alert notifications free of charge by using DingTalk. Click Activate Now.
Step 2: Add the webhook URL of the DingTalk chatbot to the alert contact
Add the webhook URL of the DingTalk chatbot to the alert contact.
Log on to the CloudMonitor console.
In the left-side navigation pane, choose .
On the Alert Contacts tab, find the alert contact that you want to modify and click Edit in the Actions column.
In the Set Alert Contact panel, enter the webhook URL of the DingTalk chatbot.
To test the connectivity of an alert callback URL, perform the following steps:
Click Test next to 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.
NoteTo obtain the details of the test result, configure the Test Template Type and Language parameters and click Test.
Click Close.
Confirm the parameter settings and click OK.
Step 3: Create an alert contact group
Add the alert contact to an alert contact group.
Log on to the CloudMonitor console.
In the left-side navigation pane, choose .
Click the Alert Contact Group tab.
On the Alert Contact Group tab, click Create Alert Contact Group.
In the Create Alert Contact Group panel, enter a name for the alert contact group and add the alert contact to the group.
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 DingTalk group receives an alert notification.