You can configure alert rules for system events of ApsaraDB RDS in the CloudMonitor console. After you configure alert rules, CloudMonitor generates alerts when the specified thresholds are reached or events are detected. This helps you make business decisions.

Background information

CloudMonitor is a service that monitors Internet applications and Alibaba Cloud resources. You can configure CloudMonitor to notify you of system exceptions. Then, you can automate the event handling process based on alert notifications. CloudMonitor supports the following notification methods:

  • Send alert notifications by using emails or DingTalk chatbots.
  • Push events to Message Service (MNS), Function Compute, Log Service, or a specified callback URL. This allows you to automate the event handling process.

Step 1: Create an alert rule

  1. Create an alert contact or alert group.
    CloudMonitor sends notifications to alert contacts in contact groups. You must create an alert contact and a contact group and add the alert contact to the contact group.
  2. Log on to the CloudMonitor console.
  3. In the left-side navigation pane, choose Alerts > Alert Rules.
  4. On the page that appears, click the Event Alert tab. On the Event Alert tab, click Create Event Alert.
  5. In the panel that appears, configure the parameters to create an alert rule.
    Parameter Description
    Alert Rule Name Enter the name of the alert rule. The name can be up to 30 characters in length and can contain letters, digits, and underscores (_).
    Event Type Select System Event.
    Product Type Select ApsaraDB for RDS. You can follow a similar procedure to create alert rules for other cloud services.
    Event Type Retain the default value All types.
    Event Level Select one or more event levels. Valid values: CRITICAL, WARN, and INFO.
    Event Name Select the name of the event.
    Note
    • The valid values of this parameter vary based on the value of the Event Level parameter. For more information about the relationship between event types and event levels, see System events for ApsaraDB RDS. For more information about other cloud services, see System events overview.
    • If you want to test the event notification feature in Step 2: Test the alert rule, do not select All Events for this parameter.
    Resource Range Select All Resources or Application Groups. If you select Application Groups, you must specify the groups. For more information, see Application group.
    Alert Type Select the following notification methods based on your business requirements:
    • Alert Notification: sends alert notifications to a specific contact group by using a specific notification method. This is the default value. You must specify a contact group and a notification method.
    • MNS queue: pushes the event alert to a specific queue in MNS. For more information, see What is MNS?.
    • Function service: pushes the event alert to a specific function in Function Compute. For more information, see Overview.
    • URL callback: pushes the event alert to a specific callback URL. CloudMonitor delivers event alerts to the specific callback URL by using the POST or GET method. For more information, see Configure callbacks for system event-triggered alerts.
    • Log Service: pushes the event alert to a specific Logstore in Log Service. For more information, see What is Log Service?.
  6. Click OK.

Step 2: Test the alert rule

After an alert rule is created, you can test the alert rule. You can check whether alert notifications can be received or whether event alerts can be pushed to MNS, Function Compute, Log Service, or the specified callback URL.

  1. Log on to the CloudMonitor console.
  2. In the left-side navigation pane, choose Alerts > Alert Rules.
  3. Click the Event Alert tab.
  4. Find the alert rule that you want to test and click Test in the Actions column.
  5. In the Create event test panel, select the event that you want to test and modify the content.
    Figure 1. Create an event test
    Create an event test
  6. Click OK.
    CloudMonitor sends an event that contains specific content and an alert is sent by using the specified notification methods. For example, the alert may be sent through a notification and by using MNS.

Operations

CloudMonitor API operation Description
PutEventRule Creates or modifies an alert rule.