You can use CloudMonitor to configure alert rules for system events to get notified when the specified events occur.

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.

Test 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 of the Alert Rule page, find the system event-triggered alert rule that you want to test and click test in the Actions column.
  5. In the Create event test panel, select the event to be tested.
  6. In the Content(JSON) section, modify the event content such as the instance ID as needed.
  7. Click OK.
    CloudMonitor generates an event based on the event content to trigger the alert rule.

References

CloudMonitor allows you to have state change events of Elastic Compute Service (ECS) instances automatically handled by associating subsequent processing methods with alert rules, such as associating Message Service (MNS) queues. For more information, see Automate O&M based on status change events of ECS instances.