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
On the Monitoring tab of the details page of an ECS instance, you can enable the initiative alert and custom alert rule features.
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 of this topic.
You can configure custom alert rules for the ECS instance. The custom alert rules take effect only on the ECS instance. For more information, see the Configure custom alert rules section of this topic.
NoteYou can manage alert rules or use more monitoring and alerting features in 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 you enable the initiative alert feature, relevant alert rules take effect on all ECS instances in your Alibaba cloud account.
Log on to the ECS console.
In the left-side navigation pane, choose .
In the top navigation bar, select the region and resource group to which the resource belongs.
Find an ECS instance and click the instance ID. The instance details page appears.
Click the Monitoring tab, click the Alert Rules tab, and then click On Key Alert.
In the Proactive Alert panel, turn on Proactive Alert to enable the initiative alert feature.
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. To disable an alert rule, find the alert rule and click Disable in the Actions column. In the Disable Alert Rule message, click Disable.
Delete an alert rule. If you no longer require an alert rule, find the alert rule and click Delete in the Actions column. In the Delete Alert Rule message, click Delete.
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 custom alert rules automatically take effect on the ECS instance to help you detect instance exceptions at the earliest opportunity.
Log on to the ECS console.
In the left-side navigation pane, choose .
In the top navigation bar, select the region and resource group to which the resource belongs.
Find an ECS instance and click the instance ID. The instance details page appears.
Click the Monitoring tab, click the Alert Rules tab, and then click Create Alert Rule.
In the Create Alert Rule panel, follow the on-screen instructions to create custom alert rules and click Confirm.
The following table describes the parameters used to create custom alert rules.
Parameter
Description
Rule Description
The name and content of the alert rules.
Click Add Rule, select a metric type from the drop-down list, configure the parameters in the Configure Rule Description panel, and then click OK.
NoteThe rule content specifies the condition that triggers an alert. For example, if the average CPU utilization is greater than or equal to 90% for three consecutive cycles in 5 minutes, an alert is triggered. CloudMonitor checks whether the condition is met for only three times every 5 minutes.
For information about the ECS metrics of alert rules, see Operating system monitoring.
Mute For
The interval at which CloudMonitor resends an alert notification if the issue that triggers the alert persists.
Effective Period
The period during which the alert rules are in effect. CloudMonitor monitors metrics and generates alerts based on the alert rules only within the effective period. If you do not specify an effective period, the alert rules take effect throughout the day.
Alert Contact Group
The contacts or contact groups to which alert notifications are sent. For information about how to configure alert contacts or contact groups, see Create an alert contact or alert contact group.
Alert Callback
The webhook address, which must be a URL accessible over the Internet. CloudMonitor pushes an alert notification to the specified URL by sending an HTTP POST request. Only the HTTP protocol is supported.
(Optional) In the alert rule list, find a custom alert rule and click buttons in the Actions column to perform operations on the rule, such as modifying or copying the rule.
References
You can enable the initiative alert feature in the CloudMonitor console to quickly build an alert system in a cloud service and detect exceptions of key metrics at the earliest opportunity. For more information, see Enable the initiative alert feature.
To monitor the utilization of various cloud resources, create alert rules in the CloudMonitor console. For more information, see Create an alert rule.