All Products
Search
Document Center

Elastic Compute Service:Send event notifications by using a DingTalk chatbot

Last Updated:Apr 01, 2026

Set up a DingTalk chatbot to automatically push Elastic Compute Service (ECS) system events—such as instance status changes and O&M events—to a DingTalk group, so your team can detect and respond to exceptions without checking the console.

How it works

The notification pipeline uses two services: a DingTalk chatbot and CloudMonitor.

One-time manual setup:

  1. Create a DingTalk chatbot for your DingTalk group to get a webhook URL.

  2. Register the webhook URL as the contact information of a CloudMonitor alert contact.

  3. Configure a CloudMonitor subscription policy to send event notifications to the alert contact group.

Automated notification flow (after setup):

  1. Alibaba Cloud detects a system event on an ECS instance and pushes it to the CloudMonitor event center.

  2. CloudMonitor sends a notification to the alert contact group using the webhook URL.

  3. The DingTalk chatbot receives the notification and posts it to the DingTalk group.

For a list of ECS system events, see System event summary.

Prerequisites

Before you begin, make sure you have:

  • A DingTalk group with admin rights to add a custom chatbot

  • Access to the Cloud Monitor console with permissions to create alert contacts, contact groups, and subscription policies

  • At least one ECS instance running

From 00:00:00 on September 1, 2023, non-enterprise DingTalk groups no longer support custom chatbots. Existing custom chatbots are not affected.

Step 1: Create a DingTalk chatbot

Create a DingTalk chatbot for your group to get a webhook URL. You use this URL in Step 2 to connect the chatbot to CloudMonitor.

Follow Steps 1, 3, 4, 5, and 6 in Create a DingTalk chatbot.

When configuring keywords for the chatbot, add keywords that appear in CloudMonitor event notifications. For example, add CloudMonitor as a keyword—CloudMonitor event notifications contain this string.

After the chatbot is created, save the webhook URL. You need it in the next step.

Step 2: Connect the chatbot to CloudMonitor

Connect the DingTalk chatbot to CloudMonitor by creating an alert contact with the webhook URL, adding it to a contact group, and setting up a subscription policy to define which events trigger notifications.

For alert contact setup details, see Create an alert contact or an alert contact group. For subscription policy details, see Manage event subscriptions (Recommended).

  1. Log on to the Cloud Monitor console.

  2. Create an alert contact. In the DingTalk | Lark | WeCom | Slack Webhook(http|https): field, paste the webhook URL you saved in Step 1.

    1. In the left-side navigation pane, choose Alerts > Alert Contacts.

    2. Click Create Alert Contact.

    3. In the Set Alert Contact panel, fill in the contact details.

  3. Create an alert contact group.

    1. Click the Alert Contact Group tab.

    2. Click Create Alert Contact Group.

    3. In the Create Alert Contact Group panel, fill in the group name, then add the alert contact you just created.

  4. Create a subscription policy. When selecting events, consider the notification volume for your team. Instance status change events have a severity level of Notification (Info). A large number of notifications may be sent for this type of event at a high frequency. Select the event for which you want to receive notifications based on your business requirements. In the notification settings, select the alert contact group that contains the DingTalk chatbot contact. The steps and figures below show an example subscription policy configuration for instance status change events and its notification settings.

    1. In the left-side navigation pane, choose Event Center > System Event.Event Center > System Events

    2. On the System Events page, click the Event Subscription tab.

    3. On the System Event page, click the Event Subscription tab.

    4. On the Create Subscription Policy page, configure the event filter and notification settings.

    image.png

Verify the setup

Trigger a test event to confirm that the end-to-end notification pipeline works.

  1. In the ECS console, stop a running ECS instance.

  2. Open your DingTalk group and check for a new message from the chatbot.

The notification looks similar to the following example:

ding-notice

If no message arrives, check:

  • The webhook URL in the alert contact matches the one from your DingTalk chatbot.

  • The alert contact group is selected in the subscription policy notification settings.

  • The subscription policy includes instance status change events.

What's next

  • To monitor other ECS events, edit the subscription policy and add more event types.

  • To notify multiple teams, add more alert contacts to the contact group, or create separate subscription policies with different contact groups.