All Products
Search
Document Center

Elastic Compute Service:Configure alerts for an ECS instance

Last Updated:Feb 23, 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 detect exceptions of the instance at the earliest opportunity.

Background information

You can configure 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 the CPU utilization, disk usage, memory usage, and network bandwidth usage are created for all ECS instances in your Alibaba Cloud account. For more information, see Enable the initiative alert feature.

  • 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 Configure custom alert rules.

    Note

    If you want 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 establish an alert system for ECS and obtain the exception information of key metrics at the earliest opportunity. After the initiative alert feature is enabled, the related 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 enable the initiative alert feature, 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 instance based on your business requirements. The created custom alert rules automatically take effect on the 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 alert rules, including the rule name and content.

      The rule content specifies the condition that triggers an alert. For example, if the condition specifies that the average CPU utilization in 5 minutes is greater than or equal to 90% for three consecutive cycles, 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 Metrics.

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

      Mute For

      The interval at which an alert notification is resent 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 validity period that you specify.

    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.

      Valid values:

      • Phone Call, Text Message, Email, and Webhook URL

      • Text Message, Email, and Webhook URL

      • Email and Webhook URL

      You can specify supplementary 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 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