ApsaraDB for Redis is integrated with CloudMonitor. You can configure alert rules for ApsaraDB for Redis in the CloudMonitor console. Alerts are immediately generated after the specified thresholds are exceeded or events are detected. This allows you to make informed 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 use alert notifications to automate the event handling process. CloudMonitor supports the following event notification methods:

  • Sends alert notifications by using emails or DingTalk chatbots.
  • Push events to Message Service (MNS), Function Compute, Log Service, or the specified callback URL. This allows you to automate the process of anomaly handling based on your business requirements.

Step 1: Create an alert rule

  1. Create an alert contact or alert group.
    CloudMonitor sends alerts to contacts in contact groups. Before you add an alert contact to an alert group, you must create an alert contact or alert group.
  2. Log on to the CloudMonitor console.
  3. In the left-side navigation pane, choose Alerts > Alert Rules.
  4. 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 must be 1 to 30 characters in length and can contain letters, digits, and underscores (_).
    Event Type Select System Event.
    Product Type Select ApsaraDB for Redis. You can also create alert rules for other cloud services. Follow the preceding steps to create alert rules for other cloud services.
    Event Type Select All types.
    Event Level Select the event severity level. You can select CRITICAL or WARN.
    Event Name Select the name of the event.
    Note
    • The options for this parameter are based on the value of the Event Level parameter. For more information about the relationship between event types and event severity levels, see System events for ApsaraDB for Redis. For more information about other cloud services, see System events overview.
    • If you want to test the event notification feature in Step 2, 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 information about the group. For more information, see Application group.
    Alert Type Select one of the following options based on your business requirements:
    • Alert Notification: This is the default option. You must specify a contact group and notification method.
    • MNS queue: specifies the queue in MNS to which the event alert is delivered. For more information, see What is MNS?.
    • Function service: specifies the function in Function Compute to which the event alert is delivered. For more information, see Overview.
    • URL callback: specifies the request method and callback URL. CloudMonitor delivers event alerts to the specified callback URL by using the POST or GET method. For more information, see Configure callbacks for System event-triggered alerts.
    • Log Service: specifies the Logstore in Log Service to which the event alert is delivered. For more information, see What is Log Service?.
  6. Click OK.

Step 2: Test an alert rule

After you create a system event-triggered alert rule, you can test the alert rule. You can check whether alert notifications can be received or whether events 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 system event-triggered alert rule that you have created 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 method. For example, the alert may be sent through a notification and by using Message Service.

API operations

API operation Description
PutEventRule Creates or modifies an event-triggered alert rule.