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. 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

ACK is activated and a cluster is created. For more information, see Quick start for first-time users.

Create an alert rule

  1. Log on to the CloudMonitor console.
  2. In the left-side navigation pane, click Container Service Monitoring.
  3. 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.
  4. On the Alert Rules page, click Create Alert Rule.
  5. In the Create Alert Rule panel, set the required 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.
    • Node: The alert rule is applied to all nodes or specified nodes in the cluster.
    • 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.
    Rule Description The condition that triggers the alert rule. If the metric meets the specified condition, the alert rule is triggered.
    Channel Silence Cycle The interval at which CloudMonitor sends alert notifications until the alert that is triggered based on the alert rule is cleared. Valid values: 5 min, 15 min, 30 min, 60 min, 3 h, 6 h, 12 h, and 24 h.

    If the threshold value is exceeded, CloudMonitor sends an alert notification. If the threshold value is exceeded again within the mute period, CloudMonitor does not resend an alert notification. If the alert is not cleared when the mute period elapses, CloudMonitor resends an alert notification.

    Effective Time The period during which the alert rule is effective. CloudMonitor monitors the specified resources based on the alert rule only within the specified period.
    HTTP WebHook The URL that is used to receive the alert notifications sent from CloudMonitor by using HTTP POST requests. The URL must be accessible over the Internet. You can enter only an HTTP URL. For more information about how to set callback URLs, see Use the alert callback feature to send notifications about threshold-triggered alerts.
    Alert Contact Group The contact group to which alert notifications are sent.

    The alert notifications of the application group are sent to the alert contacts that belong to the contact group. A contact group can contain one or more alert contacts.

    For more information about how to create alert contacts and contact groups, see Create an alert contact or alert contact group.

  6. Click OK.

View an alert rule

  1. Log on to the CloudMonitor console.
  2. In the left-side navigation pane, click Container Service Monitoring.
  3. 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.
  4. On the Alert Rules page, find the alert rule that you want to view and click Rule Details or Alert Logs in the Actions column.
    You can view the details of the alert rule, alert logs, and faulty resources.

Modify an alert rule

  1. Log on to the CloudMonitor console.
  2. In the left-side navigation pane, click Container Service Monitoring.
  3. 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.
  4. On the Alert Rules page, find the alert rule that you want to modify and click Modify in the Actions column.
  5. In the Modify Alert Rule panel, modify the parameters as required.
  6. Click OK.

Delete an alert rule

  1. Log on to the CloudMonitor console.
  2. In the left-side navigation pane, click Container Service Monitoring.
  3. 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.
  4. On the Alert Rules page, find the alert rule that you want to delete and click Delete in the Actions column.
  5. In the Delete Alert message, click Confirm.

Disable an alert rule

Note After you create an alert rule, the alert rule is in the Normal state.
  1. Log on to the CloudMonitor console.
  2. In the left-side navigation pane, click Container Service Monitoring.
  3. 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.
  4. On the Alert Rules page, find the alert rule that you want to disable and choose More > Disable in the Actions column.
  5. In the Disable Alert Rule message, click Confirm.

Enable an alert rule

You can enable an alert rule only if the alert rule is in the Disabled state.

  1. Log on to the CloudMonitor console.
  2. In the left-side navigation pane, click Container Service Monitoring.
  3. 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.
  4. On the Alert Rules page, find the alert rule that you want to enable and choose More > Enable in the Actions column.
  5. In the Enable Alert Rule message, click Confirm.