All Products
Search
Document Center

CDN:Configure alert rules

Last Updated:Sep 19, 2024

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

Procedure

  1. Log on to the CloudMonitor console.

    • Method 1:

      1. Log on to the Alibaba Cloud CDN console.

      2. In the left-side navigation pane, click Domain Names.

      3. On the Domain Names page, click Monitor and Alert Settings in the upper-right corner.

    • Method 2: Log on to the CloudMonitor console.

  2. In the left-side navigation pane, choose Cloud Service Monitoring > Cloud Service Monitoring.

  3. On the Cloud Service Monitoring page, choose CDN and edge cloud > CDN in the left-side navigation tree.

  4. Click Create Alert Rule.

  5. 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:

    1. Click Add Rule.

    2. 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.

        Note

        The dynamic threshold feature is in invitational preview. To use the feature, you must submit a ticket.

    3. Click OK.

    Note

    For 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.

    Note

    If 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.

  6. 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.

    image

  • Rule Description

    image

    Parameter

    Example

    Metric Type

    Select Simple Indicators.

    Metric

    Instance Dimensions > InternetOut

    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.

    image

  • Rule Description

    image

    Parameter

    Example

    Metric Type

    Combined indicators

    Alert Level

    Warning(Warn)

    Multi-metric Alert Condition

    1. Click Add Metric. In the Metric drop-down list, choose Instance Dimensions > InternetOut.

    2. Set the upper threshold to greater than or equal to 300 Mbytes.

    3. Follow the preceding steps to add the Instance Dimensions > OriCodeRatio502 metric and set the upper threshold to greater than or equal to 1%.

    Note

    For 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)