CloudMonitor manages system events and custom events of Alibaba Cloud services in a centralized manner. You can configure alert rules for events of Alibaba Cloud services. This allows you to receive alert notifications at the earliest opportunity when exceptions occur. Then, you can efficiently analyze and troubleshoot issues. This topic describes how to create a system event-triggered or custom event-triggered alert rule.

Prerequisites

An application group is created and resources are added to the application group if you need to apply alert rules to instances by application group. For more information, see Create an application group and Add resources to an application group.

Background information

The following table describes the event types and Alibaba Cloud services that are supported by CloudMonitor.
Event type Description Supported Alibaba Cloud service
System event CloudMonitor provides a centralized platform for you to query system events that are generated for different Alibaba Cloud services. This allows you to track the use of Alibaba Cloud services and receive alert notifications at the earliest opportunity. Supported Alibaba Cloud services and system events
Custom event You can call an API operation of CloudMonitor to report the anomalous events that occur in your Alibaba Cloud services to CloudMonitor. This allows you to track the use of the Alibaba Cloud services and receive alert notifications at the earliest opportunity. All Alibaba Cloud services supported by CloudMonitor

Create a system event-triggered alert rule

  1. Log on to the CloudMonitor console.
  2. In the left-side navigation pane, choose Alerts > Alert Rules.
  3. On the Alert Rules page, click the Event Alert tab.
  4. On the Event Alert tab, click Create Event Alert.
  5. In the Create / Modify Event Alert panel, set the Event Type parameter to System Event and set the parameters that are described in the following table.
    Parameter Description
    Alert Rule Name The name of the event-triggered alert rule.
    Product Type The Alibaba Cloud service to which the event-triggered alert rule is applied. For more information about the Alibaba Cloud services supported by CloudMonitor, see Overview.
    Event Type The type of the event that triggers alerts. For more information about the types of the events supported by each Alibaba Cloud service, see Overview.
    Event Level The level of the event that triggers alerts. For more information about the levels of the events supported by each Alibaba Cloud service, see Overview.
    Event Name The name of the event that triggers alerts. For more information about the names of the events supported by each Alibaba Cloud service, see Overview.
    Resource Range The range of the resources to which the event-triggered alert rule is applied. Valid values:
    • All Resources: If the Resource Range parameter is set to All Resources, CloudMonitor sends an alert notification when the specified event occurs on a resource.
    • Application Groups: If the Resource Range parameter is set to Application Groups, CloudMonitor sends an alert notification only when the specified event occurs on a resource in the application group.
    Contact Group The alert group that receives alert notifications.
    Notification Method The level and notification method of the event alert. Valid value:

    Info (Email ID+DingTalk Robot)

    MNS queue The specified queue in Message Service (MNS) to which the event alert is delivered.
    Function service The specified function of Function Compute to which the event alert is delivered.
    URL callback The callback URL and request method. Enter a callback URL that can be accessed over the Internet. CloudMonitor sends a POST or GET request to push an alert to the specified callback URL. Only HTTP requests are supported. For more information about how to configure callbacks, see Configure callbacks for system event-triggered alerts.
    Log Service The specified Logstore in Log Service to which the event alert is delivered.
  6. Click OK.

Create a custom event-triggered alert rule

  1. Log on to the CloudMonitor console.
  2. In the left-side navigation pane, choose Alerts > Alert Rules.
  3. On the Alert Rules page, click the Event Alert tab.
  4. On the Event Alert tab, click Create Event Alert.
  5. In the Create / Modify Event Alert panel, set the Event Type parameter to Custom Event and set the parameters that are described in the following table.
    Parameter Description
    Alert Rule Name The name of the event-triggered alert rule.
    Application Groups CloudMonitor sends an alert notification only when the specified custom event occurs on a resource in the application group.
    Event Name The name of the custom event.
    Rule Description The details of the event-triggered alert rule. An alert notification is sent only if the alert is generated for the specified number of times within the specified period of time. The period can be 1, 2, 3, 4, or 5 minutes.
    Notification Method The notification method of the event alert. Valid value:

    Email + DingTalk

    Effective From The period of time during which the alert rule is effective. CloudMonitor checks whether the monitoring data meets the alert rule only during the effective period. Valid values: 00:00 to 23:59.
    Note This parameter is displayed after you click Advanced Configuration.
    Alert Callback The callback URL and request method. Enter a callback URL that can be accessed over the Internet. CloudMonitor sends a POST or GET request to push an alert to the specified callback URL. Only HTTP requests are supported. For more information about how to configure callbacks, see Configure callbacks for system event-triggered alerts.
    Note This parameter is displayed after you click Advanced Configuration.
  6. Click OK.