Starting from 00:00:00 (UTC+8) on April 14, 2025, Cloud Monitor no longer provides the Kubernetes container monitoring feature for new users. For more information, see Announcement on the discontinuation of the Kubernetes container monitoring feature of Cloud Monitor. We recommend that you use the container monitoring capability provided by Managed Service for Prometheus. For more information, see Monitor an ACK cluster.
You can create alert rules for Container Service for Kubernetes (ACK) clusters, nodes, and pods. When an alert is triggered based on alert rules, Cloud Monitor sends an alert notification to you. This way, you are immediately notified of exceptions and can handle the exceptions at the earliest opportunity. This topic describes how to create, view, modify, delete, enable, and disable alert rules.
Prerequisites
Container Service for Kubernetes (ACK) is activated and a cluster is created. For more information, see Quick start for first-time users.
The metrics-server component of the ACK cluster is upgraded to V0.3.8.5 or later. For more information, see Update the metrics-server component before you update the Kubernetes version to 1.12.
The monitoring feature of Cloud Monitor is manually enabled for the metrics-server component for ACK clusters that are created after 10:00:00 on April 25, 2024. For more information, see Enable the monitoring feature of Cloud Monitor for an ACK cluster.
Create an alert rule
Log on to the Cloud Monitor console.
In the left-side navigation pane, choose .
On the Container Service Monitoring page, find the cluster for which you want to create an alert rule and click View Alert Rules in the Actions column.
On the Alert Rules page, click Create Alert Rule.
In the Create Alert Rule panel, configure the parameters. The following table describes the parameters.
Parameter
Description
Resource Range
The resources to which the alert rule is applied. Valid values:
Cluster: The alert rule is applied to the cluster. If you select this option, you must select a cluster name.
Node: The alert rule is applied to all nodes or specified nodes in the cluster. If you select this option, you must select a cluster and one or more nodes.
Container Group (pod): The alert rule is applied to all pods or specified pods in the specified application under the specified namespace of the cluster. If you select this option, you must select a cluster and its namespace, and then select an application and one or more pods on the Deployment, StatefulSet, DaemonSet, Job, or CronJob tab.
NoteOn the Container Group tab, you only need to select one or more pods.
Rule Description
The condition that triggers the alert rule. If the metric meets the specified condition, the alert rule is triggered.
Mute Period
The interval at which Cloud Monitor resends an alert notification of the same severity level before the alert is cleared. Valid values: 5 Minutes, 15 Minutes, 30 Minutes, 60 Minutes, 3 Hours, 6 Hours, 12 Hours, and 24 Hours.
Cloud Monitor sends an alert notification when a metric value reaches the threshold.
If the alert level remains unchanged within the mute period, Cloud Monitor does not resend an alert notification.
If the alert level is changed (for example, the alert is cleared) within the mute period, or the metric value reaches the threshold again after the mute period ends, Cloud Monitor resends an alert notification.
NoteCloud Monitor does not send alert notifications in the Notification Disabled or Mute state.
Mute indicates that a specific resource is in the mute period, during which Cloud Monitor does not send alert notifications for the resource.
Notification Disabled indicates that multiple resources are in the mute period, during which Cloud Monitor does not send alert notifications for the resources.
Effective Period
The period during which the alert rule is effective. Cloud Monitor monitors the specified resources based on the alert rule only within the specified period.
Alert Callback
The callback URL that can be accessed over the Internet. Cloud Monitor sends HTTP POST requests to push alert notifications to the specified URL. Only the HTTP protocol is supported. For more information about how to configure alert callback, see Use the alert callback feature to send notifications about threshold-triggered alerts.
Alert Contact Group
The alert contact groups to which alert notifications are sent.
The alert notifications 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.
Click OK.
View an alert rule
Log on to the Cloud Monitor console.
In the left-side navigation pane, choose .
On the Container Service Monitoring page, find the cluster whose alert rule you want to view and click View Alert Rules in the Actions column.
On the Alert Rules page, find the alert rule that you want to view and click More or Alert History in the Actions column.
You can view the details of the alert rule, alert history, and faulty resources.
Modify an alert rule
Log on to the Cloud Monitor console.
In the left-side navigation pane, choose .
On the Container Service Monitoring page, find the cluster for which you want to modify an alert rule and click View Alert Rules in the Actions column.
On the Alert Rules page, find the alert rule that you want to modify and click Modify in the Actions column.
In the Modify Alert Rule panel, modify the parameters as required.
Click OK.
Delete an alert rule
Log on to the Cloud Monitor console.
In the left-side navigation pane, choose .
On the Container Service Monitoring page, find the cluster for which you want to delete an alert rule and click View Alert Rules in the Actions column.
On the Alert Rules page, find the alert rule that you want to delete, click the
icon in the Actions column, and then click Delete. In the Delete Alert message, click OK.
Disable an alert rule
After you create an alert rule, the alert rule is in the Normal state.
Log on to the Cloud Monitor console.
In the left-side navigation pane, choose .
On the Container Service Monitoring page, find the cluster for which you want to disable an alert rule and click View Alert Rules in the Actions column.
On the Alert Rules page, find the alert rule that you want to disable, click the
icon in the Actions column, and then click Disable. In the Disable Alert Rule message, click OK.
Enable an alert rule
You can enable an alert rule only if the alert rule is in the Disabled state.
Log on to the Cloud Monitor console.
In the left-side navigation pane, choose .
On the Container Service Monitoring page, find the cluster for which you want to enable an alert rule and click View Alert Rules in the Actions column.
On the Alert Rules page, find the alert rule that you want to enable, click the
icon in the Actions column, and then click Enable. In the Enable Alert Rule message, click OK.