Tair (Redis OSS-compatible) integrates with CloudMonitor — a service that monitors Internet applications and Alibaba Cloud resources — to alert you when key instance events occur, including instance minor version update, instance failover, and instance migration. When a subscribed event triggers, CloudMonitor automatically sends alert notifications to the contacts you specify. You can then automate the anomaly handling process based on these alert notifications.
Alert notifications can be delivered through:
Emails or DingTalk chatbots
Push channels to Simple Message Queue (formerly MNS), Function Compute, Simple Log Service, or a callback URL — enabling automated event handling based on your business logic
Prerequisites
Before you begin, ensure that you have:
An alert contact and an alert contact group, with the contact added to the group. See Create an alert contact or alert contact group
Create a subscription policy
Log on to the CloudMonitor console.
In the left-side navigation pane, choose Event Center > Event Subscription.
Alternatively, choose Event Center > System Event, then click Create Immediately in the Welcome to the New Event Center section.
On the Subscription Policy tab, click Create Subscription Policy.
On the Create Subscription Policy page, configure the following parameters.
Parameter Description Name Enter a name for the subscription policy. Subscription Type Select System Events. For more information about the Redis and Tair system events supported by CloudMonitor, visit the Redis event page. Subscription Scope Set Products to ApsaraDB for Redis, Event Type to Maintenance, Event name to Instance_Failover, and Event Level to Critical. Leave Application grouping, Event Content, and Event Resources blank. This subscribes to the Instance_Failoverevent for all Tair instances across all application groups within your account.Combined Noise Reduction Use the default settings. Notification Create a notification configuration using the default notification method for Custom Notification Method: enter a name, set Notification Settings to Set Notification Group Directly, select a Contact Group, and click OK. CloudMonitor sends alert notifications using the methods configured for contacts in the selected group. For example, if a contact has a mobile phone number and email address, that contact receives alert phone calls, text messages, and emails. For more information, see Create a notification configuration policy. Push and Integration No configuration required. To set up a push channel, see Create a push channel. Click Submit.
Verify event subscription
After creating a subscription policy, send a test notification to confirm that your contacts receive alerts correctly.
On the Subscription Policy tab, click Debug Event Subscription.
In the Create Event Debugging panel, set Products to ApsaraDB for Redis and Name to Instance_Failover. CloudMonitor automatically generates debugging content in JSON format. The following is a sample payload:
{ "product": "Redis", "resourceId": "acs:redis:cn-shenzhen:1764984725705461:instance/<resource-id>", "level": "WARN", "instanceName": "instanceName", "regionId": "cn-hangzhou", "name": "Instance_Failover", "content": { "InstanceName": "r-w***gsw", "eventId": "f5f***321", "publishTime": "2024-02-26T08:17:17+08:00", "reason": "", "product": "Re***", "instanceComment": "rch***s-3", "instanceId": "r-w***gsw", "EventType": "Ins***nce", "extra": { "nodeZh": "", "impactZh": "Instance***", "reasonEn": "In***ce Fa***es(Pr***ry In***ce Una***ble)", "eventTime": "2024-02-26T08:16:22+08:00", "impactEn": "Tr***nt in***ce dis***ion", "reasonZh": "Instance***unavailable)", "nodeInfo": [], "nodeEn": "", "reasonCode": "Pla***ble" }, "instanceType": "In***ce", "eventType": "Ins***nce", "Timestamp": "1708906637.742" }, "status": "Executed" }Click OK. The Operation successful message appears. CloudMonitor sends a test alert notification to your contacts based on the notification methods specified in the subscription policy.
API reference
| API operation | Description |
|---|---|
| PutEventRule | Creates or modifies an event-triggered alert rule. |