All Products
Search
Document Center

Elastic Compute Service:Subscribe to ECS system event notifications with CloudMonitor

Last Updated:May 15, 2026

Subscribe to ECS system events in CloudMonitor to receive alerts on instance state changes and automate O&M responses.

Note

If your business requires fast event response or handles a large volume of events, subscribe to ECS events through EventBridge instead. See Subscribe to ECS events with EventBridge.

Background

CloudMonitor lets you query, manage, and monitor system events across Alibaba Cloud services. See What is CloudMonitor.

Configure alert rules in CloudMonitor to receive notifications when system events occur. CloudMonitor supports the following notification methods:

  • SMS, email, or DingTalk messages.

  • Distribution to Message Queue, Log Service, Function Compute, or Webhook for automated event handling.

Create a subscription policy

This example creates a subscription policy for the Instance:StateChange system event.

  1. Log on to the Cloud Monitor console.

  2. In the left-side navigation pane, choose Event Center > Event Subscription.

    Note

    You can also create a subscription policy from the System Event menu as follows:

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

    2. In the Welcome to the New Event Center section, click Create Now.

  3. On the Subscription Policy tab, click Create Subscription Policy.

  4. On the Create Subscription Policy page, configure the following parameters:

    • Basic Information: Enter a subscription policy name.

    • Alert Subscription:

      • Subscription Type: Select System Events.

      • Subscription Scope:

        • Service: Select ECS.

        • Event Type: Select Status Notification.

        • Event Name: Select Instance:StateChange.

        • Event Severity: Select Notification (Info).

        • Application Groups, Event Content, and Event Resources: Leave empty. Notifications are sent for Instance:StateChange events on all ECS instances under all application groups of the account.

          Note

          For a list of ECS system events, see System Event - Elastic Compute Service (ECS).

    • Combined Noise Reduction: Use the default settings.

    • Notification: Create a notification configuration. Use the default Custom Notification Method.

      Enter a notification configuration name, set Notification settings to Set the notification group directly, select an alert contact group from Contact Group, and click OK.

      Note

      See the Create a notification configuration policy section of the "Manage notification configurations" topic.

      CloudMonitor sends alert notifications based on the notification methods configured for the alert contacts in the specified group. For example, if an alert contact has a mobile number and email configured with the default notification method as the custom notification method, the contact receives alert phone calls, text messages, and emails.

    • Push and Integration: Leave empty.

Debug event subscription

After you subscribe to system event notifications, use the debugging feature to verify that notifications reach Message Queue, Log Service, Function Compute, and Webhook services as expected.

  1. On the Subscription Policy tab, click Debug Event Subscription.

  2. In the Create Event Debugging panel, set Service to ECS and Name to Instance:StateChange.

    CloudMonitor generates the debugging content in JSON format.

    Sample JSON content for the Instance:StateChange event

    {
        "product": "ECS",
        "resourceId": "acs:ecs:cn-hangzhou:1609982529920904:instance/<resource-id>",
        "level": "INFO",
        "instanceName": "instanceName",
        "regionId": "cn-hangzhou",
        "name": "Instance:StateChange",
        "content": {
            "resourceId": "i-b***vd2",
            "instanceName": "ehp***212",
            "instanceType": "ecs***rge",
            "state": "St***ng",
            "privateIpAddress": "10.***125",
            "resourceType": "ALI***nce"
        },
        "status": "Normal"
    }
  3. Click OK.

    An The operation is successful. message appears. CloudMonitor sends a test alert notification to the alert contacts based on the notification methods in the subscription policy.

References

Specify follow-up actions for event notifications to automate responses to ECS instance state changes. For example, specify a Message Service (MNS) queue in the policy. See Automate O&M on ECS state changes.