Manage event subscriptions (Recommended)

更新时间:
复制 MD 格式

Cloud Monitor sends alert notifications when system events occur or metrics meet alert conditions. Event subscriptions let you customize how these notifications are handled, including subscribing to specific events, merging and denoising alerts, escalating to different contact groups, and pushing alerts to target channels.

Background information

With event subscriptions, you can:

  • Subscribe to system events or threshold-based events.

  • Merge alerts to reduce noise and use conditional noise reduction to filter duplicate alerts.

  • Escalate unresolved alerts to the next contact group after a specified time.

  • Customize notification methods and push alert data to services such as Simple Message Queue (formerly MNS), Simple Log Service (SLS), Function Compute (FC), and webhooks.

Create a subscription policy

The following example subscribes 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 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 parameters for the subscription policy.

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

    • Alert Subscription:

      • For Subscription Type, select 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 empty. This subscribes you to the InstanceRestart:StartedDueToInstanceError system event for all ECS instances in your account.

        Note

        Supported ECS system events: Elastic Compute Service.

    • Merge and Denoise: Use the default values.

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

      Enter a name, set Notification Settings to Directly Set Notification Group, select a Contact Group, and click OK.

      Note

      Create a notification configuration policy.

      Cloud Monitor sends notifications using the methods configured for each alert contact. For example, if a contact has a mobile number and email, the default Custom Notification Method sends alerts by phone call, text message, and email.

    • Push and Integration: No configuration is required.

    Table 1. Subscription policy parameters

    Section

    Parameter

    Description

    Basic Information

    Name

    The name of the subscription policy. 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 operational events from cloud services. Subscribing lets you receive notifications or trigger external actions. Define the subscription scope: Product, Event Type, Event Name, Event Level, Application Group, Event Content, and Event Resource.

      • Event Content: Matches keywords against the Content fields in event details. Separate multiple keywords with commas (,). In whitelist mode, any keyword match triggers a hit. In blacklist mode, all keywords must match. For example, entering re,1754xxxxx651403 in whitelist mode filters events containing either keyword.

        "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: Matches keywords against the ResourceId of the cloud product, such as acs:ecs:cn-shanghai:{uid}:instance/{instanceId}. Separate multiple keywords with commas (,). In whitelist mode, any keyword match triggers a hit. In blacklist mode, all keywords must match. For example, entering instanceId_1,instanceId_2 in whitelist mode filters events for either instance.

    • Threshold-based Event: Generated when a metric alert rule is triggered. Subscribing lets you customize notifications with features such as Merge and Denoise or custom notification methods. Define the subscription scope: Product Category, Metric, Severity Level, 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 dimensions for merging from the Subscription Scope of the selected Subscription Type.

    Denoise

    Controls the frequency of alert notifications:

    • Conditional trigger, suppress after trigger: After a notification triggers a set number of times (default: 5) within a period (default: 5 minutes), notifications are muted for a mute period (default: 5 minutes). This cycle repeats.

    • Direct trigger, suppress after trigger: Sends a notification immediately, then mutes for a period (default: 5 minutes). This cycle repeats.

    • Direct trigger, no suppression (use system default anti-storm settings): Sends a notification immediately for every alert.

      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

    Notify alert contacts directly or route to different contacts based on alert level.

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

    For more information about how to configure the parameters for a notification configuration policy, see Parameters for a notification configuration policy.

    Custom Notification Method

    Customize the alert notification method.

    Click Modify to change the Notification Template and Alert Level.

    Push and Integration

    Push Channel

    The push channel for alert notifications. To create a push channel:

    1. Click Create New Push.

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

      For more information about how to configure the parameters of a notification push channel, see Parameters of a notification push channel.

  5. Click Submit.

  6. Test the event subscription.

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

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

      The system generates the test content in JSON format.

    3. Click OK.

      An operation is successful message appears. Cloud Monitor sends a test notification to the alert contacts using the subscription policy's notification method.

View a subscription policy

View the details of a subscription policy.

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

    The Subscription Policy Details panel shows the policy's basic information, event subscription, Merge and Denoise configuration, and notification settings.

Modify a subscription policy

Modify a subscription policy to update its configuration.

  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, 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 as needed.

  5. Click Submit.

Delete a subscription policy

Deleting a subscription policy stops all alert notifications to its contacts.

  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, 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

The Status of a new subscription policy is Enabled by default. Disable a policy to temporarily stop notifications to its contacts.

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

  4. Click OK.

Enable a subscription policy

Enable a subscription policy to resume alert notifications. This applies only to policies whose Status is Disabled.

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

  4. Click OK.

References