This topic describes how to use the event alert function for Alibaba Cloud services to enable alerts when a system exception occurs.
When an Alibaba Cloud service encounters a system exception, event monitoring can provide two types of notification. You can trace the event and automate the handling process.
- Event alert notification can be sent to you through , emails, and DingTalk Chatbot.
- The event is distributed to your MNS queue, Function Compute, Log Service, and URL callback. Then, you can automate the handling process based on your scenario.
If you want system events to be distributed to your MNS queue, Function Compute, Log Service, and URL callback, you must enable the corresponding services.
You can create an event alert rule. Then, you can use system event testing to check whether the configured MNS queue of the alert rule can receive event alerts in a timely manner, and whether Function Compute can be triggered.
- Create an event alert rule
- Log on to the CloudMonitor console.
- In the left-side navigation pane, click Event Monitoring.
- On the Alarm Rules tab, click Create Event Alarms. The Create/Modify Event Alarms dialog box is displayed.
- In the Basic Information section, set Alarm Rule Name.
- In the Event Alarm section, set the following parameters:
- Event Type: Select System Event.
- Product Type, Event Level, and Event Name: Set the parameters based on the actual situation.
- Resource Range: If you select All Resources, alerts are sent when any resource-related events occur. If you select Application Groups, alerts are sent only when events that are related to the resources in the specified group occur.
- Select the Alarm Type. CloudMonitor supports four alert types: alert notification, MNS queue, function service, and URL callback.
- Test an alert rule
- Access the Alarm Rules tab for event monitoring.
- Click Test in the Actions column corresponding to the RAM user.
- On the test page that appears, select the event to be tested. The corresponding event content will be displayed. You can change content fields such as the instance ID as needed.
- Click OK. The system will send an event based on the content, triggering alert notification, MNS queue, Function Compute, and URL callback that are configured in the alert rule.