You can create alert rules to monitor resource usage related to Alibaba Cloud CDN-acceleated domain names. If resource metrics meet specific alert conditions, alerts are triggered and CloudMonitor sends alert notifications. This way, you can identify and handle exceptions at the earliest opportunity.
Prerequisites
A domain name is added. For more information, see Add a domain name.
CloudMonitor is activated. To activate CloudMonitor, visit the CloudMonitor product page.
Procedure
Log on to the CloudMonitor console.
Method 1:
Log on to the Alibaba Cloud CDN console.
In the left-side navigation pane, click Domain Names.
On the Domain Names page, click Monitor and Alert Settings in the upper-right corner.
Method 2: Log on to the CloudMonitor console.
In the left-side navigation pane, choose
.On the Cloud Service Monitoring page, choose CDN and edge cloud > CDN in the left-side navigation tree.
Click Create Alert Rule.
In the Create Alert Rule panel, configure the parameters described in the following table, and use the default settings for other parameters. For more information about other parameters, see Create an alert rule.
Parameter
Description
Product
Select CDN.
Resource Range
The range of resources for which you want the alert rule to take effect. Valid values:
All Resources: The alert rule takes effect for all domain names that are added to Alibaba Cloud CDN before or after the alert rule is created.
Application Groups: The alert rule takes effect for domain names that are added to Alibaba Cloud CDN in a specific application group before or after the alert rule is created.
Instances: The alert rule takes effect for specific domain names that are added to Alibaba Cloud CDN.
Rule Description
The content of the alert rule. The parameters in this section specify the conditions that trigger an alert. To specify the rule description, perform the following steps:
Click Add Rule.
In the Config Rule Description panel, enter a rule name and specify conditions.
Single Metric: Select a metric and set the threshold and alert level for the metric.
Multiple Metrics: Select an alert level and specify alert conditions for two or more metrics.
Dynamic Threshold: For more information about dynamic thresholds, see Overview and Create dynamic threshold-triggered alert rules.
NoteThe dynamic threshold feature is in invitational preview. To use the feature, you must submit a ticket.
Click OK.
NoteFor more information about how to specify complex alert conditions, see Alert rule expressions.
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.
If a metric value reaches the threshold, CloudMonitor sends an alert notification. If the metric value reaches the threshold again within the mute period, CloudMonitor does not resend an alert notification. If the alert is not cleared after the mute period ends, CloudMonitor resends an alert notification.
For example, if the Mute For parameter is set to 12 Hours and the alert is not cleared, CloudMonitor resends an alert notification after 12 hours.
Effective Period
The period during which the alert rule is effective. CloudMonitor sends alert notifications based on the alert rule only within the effective period.
NoteIf an alert rule is not effective, no alert notification is sent. However, the alert history is still displayed on the Alert History page.
Alert Contact Group
The alert contact groups to which alert notifications are sent.
The alert notifications of the application group are sent to the alert contacts that belong to the selected alert contact groups. An alert contact group can contain one or more alert contacts.
For more information about how to create an alert contact and an alert contact group, see Create an alert contact or alert contact group.
Click Confirm.
Configuration examples
The following examples show how to configure alert rules for an Alibaba Cloud CDN-accelerated domain name. This way, you can monitor and handle exceptions at the earliest opportunity.
Configure an alert rule based on a single metric
For example, if the lower threshold of outbound traffic for a specific domain name is greater than or equal to 500 Mbit/s and the alert condition is met for 3 consecutive cycles, a Critical alert is triggered. If the upper threshold of outbound traffic is greater than or equal to 300 Mbit/s and the alert condition is met for 3 consecutive cycles, a Warn alert is triggered. The following figure shows the recommended configurations for the resource range and rule description.
Resource Range: Instances.
Associated Resources: Select
example.aliyundoc.com
.Rule Description
Parameter
Example
Metric Type
Select Simple Indicators.
Metric
Threshold and Alert Level
Select 3 Consecutive Cycles (1 Cycle = 1 Minutes) for all levels.
Set the lower threshold for the Critical level to greater than or equal to 500 Mbit/s.
Set the upper threshold for the Warn level to greater than or equal to 300 Mbit/s.
Set the average threshold for the Info level to greater than or equal to 100 Mbit/s.
Configure an alert rule based on multiple metrics
For example, if the higher threshold for the outbound traffic of a specific domain name is greater than or equal to 300 Mbit/s, or the upper threshold for the proportion of HTTP 502 status codes from the origin server is greater than or equal to 1%, and either of the two alert conditions is met for 3 consecutive cycles, a Warn alert is triggered. The following figure shows the recommended configurations for the resource range and rule description.
Resource Range: Instances.
Associated Resources: Select
example.aliyundoc.com
.Rule Description
Parameter
Example
Metric Type
Combined indicators
Alert Level
Warning(Warn)
Multi-metric Alert Condition
Click Add Metric. In the Metric drop-down list, choose
.Set the upper threshold to greater than or equal to 300 Mbytes.
Follow the preceding steps to add the
metric and set the upper threshold to greater than or equal to 1%.
NoteFor more information about how to specify complex alert conditions, see Alert rule expressions.
Relationship Between Metrics
Generate alerts if one of the conditions is met (||)
Select the number of times the threshold is reached before an alert is triggered
3 Consecutive Cycles (1 Cycle = 1 Minutes)