Create an alert rule

更新时间:
复制 MD 格式

You can create alert rules to monitor cloud resources in an application group. When resource metrics meet the specified alert conditions, Cloud Monitor automatically sends notifications to help you promptly identify and handle exceptions.

Procedure

  1. Log on to the Cloud Monitor console.

  2. In the left-side navigation pane, choose Cloud Resource Monitoring > Application Groups.

  3. On the Application Groups tab, click the name of the application group.

  4. In the left-side navigation pane, click Alert Rules.

  5. Click Create Alert Rule.

  6. In the Create Alert Rule panel, configure the parameters. The following table describes the parameters.

    Parameter

    Description

    Product

    An Alibaba Cloud service monitored by Cloud Monitor. Example: ApsaraDB RDS.

    Resource Range

    Scope of resources for this alert rule. Valid values:

    • All Resources: Applies to all resources of the specified product, including resources added later.

    • Application Groups: Applies to all resources in the specified application group of the selected product, including resources added later.

    • Instances: Applies to the specified resource of the selected product only.

    Rule Description

    Defines when Cloud Monitor triggers an alert. To configure:

    1. Click Add Rule and select a metric type.

    2. In the Configure Rule Description panel, enter a Alert Rule, then define the rule conditions.

      • Simple Metric: Select a metric, then set its threshold and alert level.

      • Combined Metrics: Select an alert level, then define an alert condition using two or more metrics.

        Note

        Multi-metric alert rules require the target resource to report data for every included metric. For example, if the rule includes a public network metric but the ECS instance has no public IP address, the alert does not trigger.

      • Expression: Select an alert level, then define an alert expression.

      • Dynamic Threshold: Smart threshold details: Overview | Create a smart threshold alert rule.

    Note

    Complex alert expressions: Alert rule expression reference.

    Mute Period

    Interval between repeated alert notifications when an alert remains active and unacknowledged. Valid values: 5 minutes, 15 minutes, 30 minutes, 60 minutes, 3 hours, 6 hours, 12 hours, and 24 hours.

    When a metric crosses its alert threshold, Cloud Monitor sends an alert. No additional alerts are sent during the mute period. After the mute period ends, if the metric still exceeds the threshold, Cloud Monitor sends another alert.

    For example, if you set the Mute Period to 12 hours and the alert remains active, Cloud Monitor sends another alert 12 hours later.

    Effective Period

    The time range during which the alert rule is active. Alerts are sent only during this period.

    Note

    Outside the effective period, alerts are not sent, but alert history records still appear in the alert history list.

    Alert Contact Group

    The group of contacts who receive alert notifications.

    An alert contact group contains one or more alert contacts. Notifications for an application group are sent to all contacts in this group.

    To create contacts or groups, see Create an alert contact or alert contact group.

    Tag

    A tag for the alert rule. Each tag has a name and a value.

    Note

    You can add up to six tags.

    Alert Callback

    A publicly accessible URL that receives alert data from Cloud Monitor via HTTP POST requests. Only HTTP is supported. Use threshold-based alert callbacks.

    To test connectivity to the callback URL:

    1. Click Test, located directly to the right of the callback URL.

      In the WebHook Test panel, check the HTTP status code and test result details to verify connectivity.

      Note

      You can also set the Test Template Type: and Language:. Then click Test again to view updated test results.

    2. Click Close.

    Note

    Click Advanced Settings to configure this parameter.

    Auto Scaling

    If you enable Auto Scaling, Cloud Monitor triggers the associated scaling rule when an alert occurs. You must specify the Region, ESS Group, and ESS Rule.

    Note

    Click Advanced Settings to configure this parameter.

    Simple Log Service

    If you enable Simple Log Service, Cloud Monitor sends alert data to a Logstore in Simple Log Service (SLS) when an alert occurs. You must specify the Region, ProjectName, and Logstore.

    Collect and analyze ECS text logs using LoongCollector.

    Note

    Click Advanced Settings to configure this parameter.

    Simple Message Queue (formerly MNS) - Topic

    If you enable Simple Message Queue (formerly MNS) - Topic, Cloud Monitor sends alert data to a Message Service (MNS) topic when an alert occurs. You must specify the region and topic.

    Create a topic.

    Note

    Click Advanced Settings to configure this parameter.

    Function Compute

    If you enable Function Compute, Cloud Monitor sends alert notifications to Function Compute (FC) for custom formatting when an alert occurs. You must specify the region, service, and function.

    Quickly create a function.

    Note

    Click Advanced Settings to configure this parameter.

    Method to handle alerts when no monitoring data is found

    How Cloud Monitor handles alerts when no monitoring data is available. Valid values:

    • Do not do anything (default)

    • Send alert notifications

    • Treated as normal

    Note

    Click Advanced Settings to configure this parameter.

  7. Click Confirm.