All Products
Search
Document Center

Elastic Compute Service:Configure alert rules for an ECS instance to detect exceptions of the instance at the earliest opportunity

Last Updated:May 24, 2024

You can enable the initiative alert feature or configure custom alert rules on the details page of an Elastic Compute Service (ECS) instance to help detect exceptions of the instance at the earliest opportunity.

Background information

You can enable the initiative alert and custom alert rule features on the Monitoring tab of the Instance Details page.

  • After you enable the initiative alert feature, alert rules related to CPU utilization, disk usage, memory usage, and network bandwidth utilization are created for all ECS instances in your Alibaba Cloud account. For more information, see the Enable the initiative alert feature section in this topic.

  • You can configure custom alert rules for an ECS instance. The custom alert rules take effect only on the ECS instance. For more information, see the Configure custom alert rules section in this topic.

    Note

    To manage alert rules or use more monitoring and alerting features, go to the CloudMonitor console. For more information, see What is CloudMonitor?

Enable the initiative alert feature

You can enable the initiative alert feature to set up an alert system for ECS and obtain exception information about key metrics at the earliest opportunity. After the initiative alert feature is enabled, relevant alert rules take effect on all ECS instances in your Alibaba cloud account.

  1. Log on to the ECS console.

  2. In the left-side navigation pane, choose Instances & Images > Instances.

  3. In the top navigation bar, select the region and resource group to which the resource belongs. 地域

  4. Find an instance and click its ID.

  5. On the Instance Details page, click the Monitoring tab.

  6. Click Initiative Alert.

  7. On the Configure Initiative Alert tab, turn on Initiative Alert.

    开启一键报警

    After you turn on Initiative Alert, you can view the alert rules in the Rule Details section. You can also perform the following operations:

    • Disable an alert rule. If you no longer need an alert rule, you can click Disable in the Actions column to disable the alert rule.

    • Modify an alert rule. If an alert rule is not suitable for your business, you can click Edit in Cloud Monitor in the Actions column to modify the alert rule in the CloudMonitor console.

Configure custom alert rules

In addition to the initiative alert feature, you can also configure custom alert rules for your ECS instance based on your business requirements. The created custom alert rules automatically take effect on the ECS instance to help you detect the exceptions of the instance at the earliest opportunity.

  1. Log on to the ECS console.

  2. In the left-side navigation pane, choose Instances & Images > Instances.

  3. In the top navigation bar, select the region and resource group to which the resource belongs. 地域

  4. Find an instance and click its ID.

  5. On the Instance Details page, click the Monitoring tab.

  6. Click Create Alert Rules.

  7. On the Create Custom Alert Rule tab, create custom alert rules.

    1. Configure parameters for the alert rules and click Next.

      创建自定义报警规则

      The following table describes the parameters.

      Parameter

      Description

      Alert Rules

      The name and content of an alert rule.

      The rule content specifies the condition that triggers an alert. For example, the condition states that if the average CPU utilization in 5 minutes is greater than or equal to 90% for three consecutive cycles, an alert is triggered. CloudMonitor checks whether the condition is met for only three times every 5 minutes.

      Note
      • For information about the ECS metrics of alert rules, see Operating system monitoring.

      • You can click Add Alert Rule to create additional alert rules.

      Mute For

      The period during which an alert is muted. This parameter specifies the interval at which an alert notification is sent to the specified contacts if the alert is not cleared.

      Validity Period

      The period during which the alert rules are in effect. The system can monitor metrics and generate alerts only during the specified period.

    2. Configure the parameters in the Configure Notification Methods step and click Create.

      报警通知

      The following table describes the parameters.

      Parameter

      Description

      Alert Contact

      The contacts or contact groups to which an alert notification is sent. For information about how to configure alert contacts or contact groups, see Create an alert contact or alert contact group.

      Notification Methods

      The methods to receive alert notifications and the supplementary information of alert notification emails.

      Supported alert notification methods:

      • Phone call, Short Message Service (SMS) message, email, and DingTalk chatbot

      • SMS message, email, and DingTalk chatbot

      • Email and DingTalk chatbot

      You can specify additional information in the Email Remark (Optional) field. The information that you specify is included in the alert notification emails.

      Callback URL

      The callback URL that can be accessed over the Internet. CloudMonitor sends a POST request to push an alert to the callback URL that you specify. Only HTTP requests are supported.

    The created custom alert rules take effect only on the current ECS instance.

  8. (Optional) Click Manage Alert Rules on the Monitoring tab to go to the CloudMonitor console to view or modify the custom alert rules.

References