All Products
Search
Document Center

CloudMonitor:Manage event subscription policies (recommended)

Last Updated:Mar 25, 2024

If a system event or metric of a resource meets an alert condition, CloudMonitor automatically sends an alert notification to the specified alert contacts. You can also use the event subscription feature to configure custom alert notifications. For example, you can subscribe to system events or threshold-triggered events, merge and denoise alerts, upgrade alert contact groups, specify custom alert notification methods, and push alert notifications to destination channels based on data templates in JSON format.

Background information

You can use the event subscription feature to perform the following operations:

  • You can configure a subscription policy to subscribe to system events or threshold-triggered events.

  • You can merge alerts based on the subscription scope of system events or threshold-triggered events. Then, you can denoise alerts by specifying conditions to manage the validity of alerts. This prevents an excessive number of alert notifications from being repeatedly sent within a short period of time.

  • CloudMonitor sends valid alert notifications that are denoised to specific alert contacts. If the related alerts are not cleared within a specified period of time, CloudMonitor automatically sends the alert notifications to the next alert contact group.

  • You can specify notification methods, notification templates, and alert levels based on your business requirements. You can push all alert data to the following channels: Message Service (MNS), Simple Log Service, Function Compute, and webhooks.

Create a subscription policy

This topic describes how to subscribe to an event by using the system event Instance:InstanceFailure.Reboot:Executing of an ECS instance as an example.

  1. Log on to the CloudMonitor console.

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

    Note

    You can also perform the following steps to create a subscription policy by using the System Event menu:

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

    2. In the Welcome to the New Event Center section, click Create Immediately to create a subscription policy.

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

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

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

    • Alert Subscription: Select System Events for Subscription Type. In the Subscription Scope section, select Elastic Compute Service (ECS) for Products, Abnormal for Event Type, Instance:InstanceFailure.Reboot:Executing for Event Name, and Critical for Event Level. Do not set Application Group, Event Content, and Event Resources. This indicates that you subscribe to the system event Instance:InstanceFailure.Reboot:Executing of all ECS instances for all application groups within your Alibaba Cloud account.

      Note

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

    • Combined Noise Reduction: Use the default settings.

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

      When you create a notification configuration, enter a notification configuration name, select Set Notification Group Directly for Notification Settings, select an alert contact group for Contact Group, and then click OK.

      Note

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

      CloudMonitor automatically sends alert notifications based on the notification methods for the alert contacts in the specified alert contact group. For example, if you set a mobile phone number and an email address for an alert contact and use the default notification method for Custom Notification Method, the alert contact receives only alert phone calls, text messages, and emails.

    • 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.

    Description

    The description of the subscription policy.

    Alert Subscription

    Subscription Type

    The type of the alert subscription. Valid values:

    • System Events: System events include the failure events and O&M events of various cloud services. If you subscribe to system events, you can receive alert notifications or use third-party systems when events occur at the earliest opportunity. You must configure the subscription scope of system events, including services, event types, event names, event levels, application groups, event content, and event resources.

    • Threshold Events: If the conditions in a threshold-triggered alert rule are met, events are triggered based on the threshold. If you subscribe to threshold-triggered events, you can configure custom alert notifications in a fine-grained manner. For example, you can merge and denoise alerts and specify custom alert notification methods. You must configure the subscription scope of threshold-triggered events, including services, metrics, severity levels, and application groups.

    Combined Noise Reduction

    Note

    If you do not configure a merging rule, all alerts that are processed by the subscription policy are merged by default.

    Merge Content

    Select a dimension based on which alerts are merged. The valid values of this parameter depend on Subscription Scope after you configure the Subscription Type parameter.

    Noise Reduction

    The method that is used to reduce the frequency at which alert notifications are sent. Valid values:

    • Conditional trigger, Continuous Is triggered, and the notification is suppressed after triggering: If an alert is consecutively triggered more than the specified times (default value: 5 Times) within a specified period of time (default value: 5 Minutes), CloudMonitor sends an alert notification only once for the alert. Then, a specified mute period (default value: 5 Minutes) is enabled. During the mute period, CloudMonitor does not resend alert notifications. After the mute period ends, this process restarts.

    • Direct trigger, suppress notification after trigger: Once an alert is triggered, CloudMonitor sends an alert notification. Then, a specified mute period (default value: 5 Minutes) is enabled. During the mute period, CloudMonitor does not resend alert notifications. After the mute period ends, this process restarts.

    • Directly triggered, not suppressed (but SMS, phone and other channels have default storm prevention settings): Once an alert is triggered, CloudMonitor sends an alert notification.

      Note

      By default, CloudMonitor can send a maximum of 50 alert notifications by email within 5 minutes.

    Notification

    Notification Configuration

    When a system event or threshold-triggered event meets an alert condition, CloudMonitor sends a notification to the alert contact directly or to different alert contacts based on the alert level.

    You can select an existing notification configuration or click Create Notification Configuration.

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

    Custom Notification Method

    The custom alert notification methods.

    You can click Modify next to a notification method to modify Notification Template and Alert Level.

    Push and Integration

    Push Channel

    The push channel of alert notifications. To create a push channel, perform the following operations:

    1. Click Add Channel.

    2. Select an existing push channel or click Increase Channels to create a push channel.

      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. Debug event subscription.

    1. On the Subscription Policy tab, click Debug event subscription.

    2. In the Create event debugging panel, set the Products parameter to Elastic Compute Service (ECS) and the Name parameter to Instance:InstanceFailure.Reboot:Executing.

      CloudMonitor automatically generates the debugging content in the JSON format.

    3. Click OK.

      The Operation successful message appears. CloudMonitor automatically sends a test alert notification to the alert contacts based on the notification methods specified in the subscription policy.

View a subscription policy

After a subscription policy is created, you can view the details of the subscription policy.

  1. Log on to the CloudMonitor console.

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

    Note

    You can also perform the following steps to create a subscription policy by using the System Event menu:

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

    2. In the Welcome to the New Event Center section, click Create Immediately to create a subscription policy.

  3. On the Subscription Policy tab, find the subscription policy that you want to view and click View in the Actions column.

    In the Subscription Policy Details panel, you can view the basic information, event subscription, combined noise reduction, and notification of the subscription policy.

Modify a subscription policy

You can modify an existing subscription policy based on your alert requirements.

  1. Log on to the CloudMonitor console.

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

    Note

    You can also perform the following steps to create a subscription policy by using the System Event menu:

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

    2. In the Welcome to the New Event Center section, click Create Immediately to create a subscription policy.

  3. On the Subscription Policy tab, find the subscription policy that you want to modify and click Edit in the Actions column.

  4. On the Edit Subscription Policy page, configure the parameters.

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

  5. Click Submit.

Delete a subscription policy

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

  1. Log on to the CloudMonitor console.

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

    Note

    You can also perform the following steps to create a subscription policy by using the System Event menu:

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

    2. In the Welcome to the New Event Center section, click Create Immediately to create a subscription policy.

  3. On the Subscription Policy tab, find the subscription policy that you want to delete and click Delete in the Actions column.

  4. In the Delete prompt message, click OK.

Disable a subscription policy

By default, the status of a new subscription policy is displayed as Enabled in the Status column. You can temporarily disable a subscription policy to prevent a large number of unnecessary alert notifications due to manual modifications. When a subscription policy is disabled, the specified alert contacts no longer receive alert notifications.

  1. Log on to the CloudMonitor console.

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

    Note

    You can also perform the following steps to create a subscription policy by using the System Event menu:

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

    2. In the Welcome to the New Event Center section, click Create Immediately to create a subscription policy.

  3. On the Subscription Policy tab, find the subscription policy that you want to disable and click Disable in the Actions column.

  4. In the message that appears, click OK.

Enable a subscription policy

You can enable a subscription policy whose Status is Disabled. After you enable the subscription policy, alert notifications are automatically resumed.

  1. Log on to the CloudMonitor console.

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

    Note

    You can also perform the following steps to create a subscription policy by using the System Event menu:

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

    2. In the Welcome to the New Event Center section, click Create Immediately to create a subscription policy.

  3. On the Subscription Policy tab, filter the subscription policies whose status is Disabled, find the subscription policy that you want to enable, and click Enable in the Actions column.

  4. In the message that appears, click OK.

References