Manage event subscriptions (Recommended)

更新时间:
复制 MD 格式

When a system event occurs or a resource metric meets its alert conditions, Cloud Monitor automatically sends an alert notification to the specified alert contacts. You can use event subscriptions to customize these alert notifications. For example, you can subscribe to system or threshold-based events, merge alerts to reduce noise, escalate alerts to different alert contact groups, customize notification methods, and push alerts to target channels using a data template in a JSON format.

Background information

Event subscriptions let you perform the following actions:

  • Subscribe to system events or threshold-based events.

  • Merge alerts from system and threshold-based events to reduce noise. You can also use conditional noise reduction to filter alerts and prevent alert storms caused by a high volume of duplicate alerts.

  • After merging and noise reduction, Cloud Monitor sends valid alert notifications directly to alert contacts. If an alert is not resolved within a specified time, Cloud Monitor automatically escalates the alert by sending the notification to the next alert contact group.

  • Customize notification methods by defining notification levels and templates for different channels. You can also integrate and push all alert data directly to services such as Simple Message Queue (formerly MNS), Simple Log Service (SLS), Function Compute (FC), and webhooks.

Event subscription covers only system events and threshold-based events for cloud products. Resource configuration changes, such as adding, deleting, or modifying security group rules, are API-level operations and are outside the scope of event subscription. To track such operations, you can use ActionTrail to record them and configure alerts.

Create a subscription policy

This topic uses an example to show how to subscribe to the InstanceRestart:StartedDueToInstanceError system event for an ECS instance.

  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. To do so, perform the following steps:

    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, set the parameters for the subscription policy.

    • Basic Information: Enter a name for the subscription policy.

    • Alert Subscription:

      • Set Subscription Type to System Event.

      • In the Subscription Scope section, set Product to ECS, Event Type to Abnormal, Event Name to InstanceRestart:StartedDueToInstanceError, and Event Level to Critical. Leave Application Group, Event Content, and Event Resource unspecified. This configuration subscribes to the InstanceRestart:StartedDueToInstanceError system event for all ECS instances in all application groups under your account.

        Note

        For more information about the system events supported by ECS, see Elastic Compute Service.

    • Merge and denoise: Use the default settings.

    • Notification: Create a notification configuration. For Custom Notification Method, use the default notification method.

      When you create a notification configuration, enter a name, set Notification Settings to Directly Set Notification Group, select an alert Contact Group, and click OK.

      Note

      For more information about how to create a notification configuration, see Create a notification policy.

      The system automatically sends alert notifications based on the notification methods specified for the alert contacts in the alert contact group. For example, if a mobile number and an email address are configured for an alert contact and you use the default for Custom Notification Method, the alert contact receives notifications only by phone, text message, and email.

    • Push and Integration: No configuration is required.

      Note

      For more information about how to create a push channel, see Create a push channel.

    Table 1. Subscription policy parameters

    Section

    Parameter

    Description

    Basic Information

    Name

    The name of the subscription policy. We recommend that you use a descriptive name.

    Description

    The description of the subscription policy.

    Alert Subscription

    Subscription Type

    The type of alert subscription. Valid values:

    • System Event: aggregates fault and O&M events from various cloud products. By subscribing to system events, you can receive timely notifications or trigger external systems when events occur. You must define the subscription scope for system events, including Product, Event Type, Event Name, Event Level, Application Group, Event Content, and Event Resource.

      • Event Content: Refers to the fields within Content in the event details. The input box performs a containment match for keywords. To enter multiple keywords, separate them with commas (,). In whitelist mode, a match is found if any of the keywords are met. In blacklist mode, all keywords must be matched. For example, in whitelist mode, if you enter re,1754xxxxx651403 in the Event Content input box, all events containing the field re or 1754xxxxx651403 are filtered.

        "content": {
                "invokeId": "t-bj05sxXXXXXXa5xq8",
                "repeats": 1,
                "finishTime": "2025-08-05T17:07:17Z",
                "commandName": "cmd-2025-08-06",
                "instanceId": "i-2ze61xxxxxugk0zoh7",
                "repeatMode": "Once",
                "playerUid": 1754xxxxx651403,
                "exitCode": 0,
                "startTime": "2025-08-05T17:07:14Z",
                "ownerId": 18250xxxxx44564,
                "commandId": "c-bj05sxxxxxxog00",
                "invocationStatus": "Success"
        }
      • Event Resource: The ResourceId corresponding to the cloud product, for example, acs:ecs:cn-shanghai:{uid}:instance/{instanceId}. The input box performs a containment match for keywords. To enter multiple keywords, separate them with commas (,). In whitelist mode, a match is found if any of the keywords are met. In blacklist mode, all keywords must be matched. For example, in whitelist mode, if you enter instanceId_1,instanceId_2 in the Event Resource input box, events with the instance ID instanceId_1 or instanceId_2 are filtered.

    • Threshold-based Event: When an alert rule for a threshold is triggered, a threshold-based event is generated in Cloud Monitor. By subscribing to threshold-based events, you can achieve fine-grained control and customization of alert notifications, such as using the merge and denoise feature and custom notification methods. You must define the subscription scope for threshold-based events, including Product Category, Metric, Severity, and Application Group.

    Merge and denoise

    Note

    If you do not set a merge rule, all alerts accepted by the subscription policy are merged by default.

    Merge Content

    Select the merge dimension from the Subscription Scope of Subscription Type.

    Denoise

    Reduce the frequency of alert notifications. The options are:

    • Conditional trigger, suppress after trigger: If a notification is triggered a certain number of times (default: 5) within a specific period (default: 5 minutes), a mute period (default: 5 minutes) is entered. During the mute period, no duplicate notifications are sent. After the mute period ends, this process repeats.

    • Direct trigger, suppress after trigger: A notification is sent immediately when an alert is triggered. Then, a mute period (default: 5 minutes) is entered. During the mute period, no duplicate notifications are sent. After the mute period ends, this process repeats.

    • Direct trigger, no suppression (use system default anti-storm settings): A notification is sent immediately when an alert is triggered.

      Note

      The default anti-storm rules are as follows:

      • Text message: 5 messages per 2 minutes.

      • Phone call: 3 calls per 2 minutes.

      • Email: Up to 50 emails per 5 minutes.

    Notification

    Notification Configuration

    When a system event or threshold-based event meets the alert conditions, notify the alert contacts directly or notify different alert contacts based on the alert level.

    You can select an existing notification configuration or click Create Notification Configuration to create a new one.

    Configure the policy based on the notification policy parameters.

    Custom Notification Method

    Customize the alert notification method.

    Click Modify next to a notification method to change the Notification Template and Alert Level.

    Push and Integration

    Push Channel

    The push channel for alert notifications. To create a push channel, perform the following steps:

    1. Click Create New Push.

    2. Select an existing push channel or click Add Channel to create a new one.

      Parameters of a notification push channel.

  5. Click Submit.

  6. Test the event subscription.

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

    2. In the Create Event Debug panel, set Product to ECS and Name to InstanceRestart:StartedDueToInstanceError.

      The system automatically generates the test content in JSON format.

    3. Click OK.

      An Operation Is Successful message appears. Cloud Monitor automatically sends a test alert notification to the alert contacts based on the notification method in the subscription policy.

View a subscription policy

After you create a subscription policy, you can view its details.

  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. To do so, perform the following steps:

    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, find the target subscription policy and click View in the Actions column.

    In the Subscription Policy Details panel, you can view the basic information, event subscription, merge and denoise settings, and notification settings for the policy.

Modify a subscription policy

If an existing subscription policy does not meet your requirements, you can modify it.

  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. To do so, perform the following steps:

    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, find the target subscription policy and click Edit in the Actions column.

  4. On the Edit Subscription Policy page, modify the parameters for the subscription policy.

    For more information about the parameters for a subscription policy, see Subscription policy parameters.

  5. Click Submit.

Delete a subscription policy

After you delete a subscription policy, the alert contacts will no longer receive alert notifications.

  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. To do so, perform the following steps:

    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, find the target subscription policy and click Delete in the Actions column.

  4. In the Delete Confirmation dialog box, click OK.

Disable a subscription policy

By default, the Status of a new subscription policy is Enabled. You can disable a subscription policy to temporarily avoid receiving a large number of unnecessary alert notifications during manual changes. While a policy is disabled, alert contacts do not receive alert notifications.

  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. To do so, perform the following steps:

    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, find the target subscription policy and click Disable in the Actions column.

  4. Click OK.

Enable a subscription policy

You can enable a subscription policy if its Status is Disabled. After you enable the subscription policy, alarm notifications are automatically resumed.

  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. To do so, perform the following steps:

    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, use the drop-down list to filter for policies that are disabled. Then, find the target subscription policy and click Enable in the Actions column.

  4. Click OK.

References