Configure alert rules
You can configure an alert rule to monitor metrics for a target event bus. When a metric reaches a specified threshold, EventBridge sends an alert notification to help you promptly identify and address any anomalies.
Prerequisites
Procedure
Log on to the EventBridge console. In the left-side navigation pane, click Event Buses.
In the top navigation bar, select a region. On the Event Buses page, click the name of the target event bus.
On the Overview page of the target event bus, click Metric Monitoring in the left-side navigation pane.
On the Metric Monitoring page, click the
icon in the upper-right corner, and then click Alert Rules.You are redirected to the Alert Rules page of the CloudMonitor console. Click Create Alert Rule.
In the Create Alert Rule panel, configure the following parameters and click Confirm.
Parameter
Example
Description
Product
EventBus
Select EventBus from the drop-down list.
Resource range
All Resources
Select All Resources to apply the alert rule to all your event buses.
Rule description
Alert Rule: demo
Metric Type: Simple Metric
Metric: Filter Failures
Alert Level: Warn
Threshold: 1000 count
Click Add Rule and select a metric type from the drop-down menu.
In the Configure Rule Description panel, enter an Rule Name name, and then configure the rule conditions.
Simple Metric: Select a Metric, and then set a threshold and an alert level.
Combined Metrics: Select an Alert Level, and then configure the Multi-metric alert description.
NoteIf you configure multiple alert rules, you must specify the Relationship Between Metrics. The following options are available:
Generate alerts if all metrics meet the conditions (&&): An alert is triggered only when all alert rule conditions are met.
Generate alerts if one of the conditions is met (||): An alert is triggered if any alert rule condition is met.
Expression: Select an alert level, and then configure the alert expression.
Dynamic Threshold: For more information about dynamic thresholds, see Overview and Create a dynamic threshold-based alert rule.
Click OK.
NoteFor information about how to configure complex alert conditions by using an expression, see Expressions for alert rules.
Mute For
15 Minutes
The period CloudMonitor waits before resending a notification for an unresolved alert. Valid values: 5 Minutes, 15 Minutes, 30 Minutes, 60 Minutes, 3 Hours, 6 Hours, 12 Hours, and 24 Hours.
When a metric triggers an alert, CloudMonitor sends a notification. If the metric continues to exceed the threshold, no further notifications are sent during this mute period. If the alert condition persists after the mute period ends, CloudMonitor sends another notification.
Effective time
Start time: 00:00
End time: 23:59
Cycle: Monday to Sunday
CloudMonitor sends alert notifications only during this period.
NoteWhen a rule is outside its effective period, CloudMonitor does not send alert notifications. However, alert records still appear in the Alert History list.
Tag
Tag key: key
Tag value: value
The tags of the alert rule. A tag consists of a tag key and a tag value.
NoteYou can add up to 6 tags.
Alert Contact Group
test
The alert contact group that receives alert notifications.
CloudMonitor sends alert notifications to the contacts in the specified alert contact group. An alert contact group can contain one or more alert contacts.
For more information about how to create alert contacts and alert contact groups, see Create an alert contact or an alert contact group.
Alert callback
http://alert.aliyun.com:8080/callback
A publicly accessible URL that receives alert information from CloudMonitor through HTTP POST requests. Only the HTTP protocol is supported. For more information about how to configure an alert callback, see Use the alert callback feature.
To test the connectivity of the callback URL, perform the following steps:
Click Test next to the callback URL.
In the Webhook test panel, you can check the returned status code and test results to troubleshoot connectivity issues.
NoteYou can also specify the Callback Template Type and Language for the Webhook and click Test again to view the corresponding test results.
Click Close.
NoteClick Advanced Settings to configure this parameter.
Push channels
Elastic Strategy
You can forward alert information to other Alibaba Cloud services through four push channels. To enable a channel, turn on its switch and configure the required parameters:
Auto Scaling: If you turn on the Auto Scaling switch, an alert triggers a scaling rule. For more information about how to create a scaling group and a scaling rule, see Configure scaling groups and Configure scaling rules.
Log Service: If you turn on the log service switch, CloudMonitor sends alert information to a Logstore in Log Service when an alert occurs. For more information about how to create a project and a Logstore, see Collect and analyze ECS text logs by using Logtail.
Simple Message Queue (formerly MNS): If you turn on the SMQ switch, CloudMonitor sends alert information to a topic in Simple Message Queue when an alert occurs. For more information about how to create a topic, see Create a topic.
Function Compute: If you turn on the Function Compute switch, CloudMonitor sends alert notifications to Function Compute for format processing when an alert occurs. For more information about how to create a service and a function, see Create a function.
No-data handling method
Do not do anything
The action to take when no metric data is available. Valid values:
Do not do anything (default)
Send alert notifications
Treat as normal
NoteClick Advanced Settings to configure this parameter.