All Products
Search
Document Center

ApsaraDB for Redis:Subscribe to event notifications

Last Updated:Sep 22, 2023

ApsaraDB for Redis is integrated with CloudMonitor. You can configure alert rules for ApsaraDB for Redis in the CloudMonitor console. Alerts are immediately generated when thresholds are exceeded or when 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 anomalies. Then, you can automate the anomaly handling process based on alert notifications. CloudMonitor supports the following alert notification methods:

  • Send 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 anomaly handling process based on your business requirements.

Step 1: Create an alert rule

Note

CloudMonitor sends alerts to alert contacts in alert contact groups. You must first create an alert contact and an alert contact group, and add the alert contact to the alert contact group. For more information, see Create an alert contact or alert contact group.

  1. Log on to the ApsaraDB for Redis console and go to the Instances page. In the top navigation bar, select the region in which the instance is deployed. Then, find the instance and click its ID.
  2. In the left-side navigation pane, click Alarm Settings.

  3. In the upper-right corner of the page, click Alert Settings to go to the CloudMonitor console.

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

  5. On the System Event page, click the Event-triggered Alert Rules tab.

  6. Click Create Alert Rule.

  7. In the Create/Modify Event-triggered Alert Rule panel, configure the parameters of the system event-triggered alert rule.

    Parameter

    Description

    Alert Rule Name

    The name of the alert rule. The name can contain letters, digits, and underscores (_). The name can be up to 30 characters in length.

    Product Type

    The cloud service for which you want to create the alert rule. Select ApsaraDB for Redis. You can also create alert rules for other cloud services. Perform the preceding steps to create alert rules for other cloud services.

    Event Type

    The type of the event that triggers alerts. For more information about the types of the events that are supported by each Alibaba Cloud service, see Appendix 2: System events.

    Event Level

    The event severity level. You can select CRITICAL or WARN.

    Event Name

    The name of the event that triggers alerts. The options for this parameter vary based on the value of the Event Level parameter. For more information about the relationship between event types and event severity levels, see ApsaraDB for Redis. For more information about the events related to other cloud services, see Appendix 2: System events.

    Keyword Filtering

    The keywords that are used to filter the alert rule. Valid values:

    • Contains any of the keywords: If the alert rule contains any one of the specified keywords, no alert notification is sent.

    • Does not contain any of the keywords: If the alert rule does not contain any one of the specified keywords, no alert notification is sent.

    SQL Filter

    The SQL statements that are used to filter the alert rule.

    Resource Range

    The range of the resources to which the event-triggered alert rule is applied. Valid values:

    • All Resources: CloudMonitor sends an alert notification when the specified event occurs on a resource.

    • Application Groups: CloudMonitor sends an alert notification only if the specified event occurs on a resource in the specified application group.

    Contact Group

    The alert contact group that receives alert notifications.

    Notification Method

    The severity level and notification method of the event-triggered alert. Valid values:

    • Critical (Phone Call + Text Message + Email + Webhook)

    • Warning (Text Message + Email + Webhook)

    • Info (Email + Webhook)

    Message Service - Queue

    The Message Service (MNS) queue to which event-triggered alerts are delivered.

    Function Compute

    The Function Compute function to which event-triggered alerts are delivered.

    URL Callback

    The callback URL that can be accessed over the Internet. CloudMonitor sends POST requests to push alert notifications to the specified callback URL. You can enter only an HTTP URL. For more information about how to configure alert callbacks, see Configure callbacks for system event-triggered alerts.

    Log Service

    The Simple Log Service Logstore to which event-triggered alerts are delivered.

    Mute For

    The interval at which CloudMonitor resends alert notifications before an alert is cleared. Valid values: 5 Minutes, 15 Minutes, 30 Minutes, 60 Minutes, 3 Hours, 6 Hours, 12 Hours, and 24 Hours.

  8. Click OK.

Step 2: Test the 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, Simple Log Service, or the specified callback URL.

  1. Log on to the CloudMonitor console.

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

  3. On the System Event page, click the Event-triggered Alert Rules tab.

  4. On the Event-triggered Alert Rules tab, find the alert rule that you want to test, click the More icon in the Actions column, and then click Test.

  5. In the Create Event Test panel, select the event to be tested.

  6. In the Content (JSON) section, edit the event content, such as the instance ID.

  7. Click OK.

    CloudMonitor generates an event based on the event content to trigger the alert rule.

Related API operations

Operation

Description

PutEventRule

Creates or modifies an event-triggered alert rule.