This topic describes how to set alert rules for an AnalyticDB for MySQL cluster to monitor the cluster CPU utilization, disk usage, input/output operations per second (IOPS), and the number of database connections in real time. If the conditions specified in an alert rule are met, the system notifies all contacts in the specified contact groups.

Background information

AnalyticDB for MySQL monitors clusters and generates alerts by using CloudMonitor. For more information, see the CloudMonitor. CloudMonitor allows you to set metrics and specify contact groups. If an alert is triggered, CloudMonitor notifies all contacts in the specified contact groups. You can maintain contact groups for metrics to ensure that the contacts receive alerts at the earliest opportunity.

The metrics include the cluster CPU utilization, disk usage, IOPS, and the number of database connections. You can configure alert rules based on the metrics. For example, you can configure the following alert rule: If the disk usage is equal to or greater than 90%, AnalyticDB for MySQL blocks data write requests and processes only data read requests. When the disk usage reaches the specified threshold, an alert is immediately sent to the specified contacts. This helps you manage disk space at the earliest opportunity to ensure the normal operation of your business.

Procedure

  1. Log on to the AnalyticDB for MySQL console.
  2. In the upper-left corner of the page, select the region where the cluster you want to manage is located.
  3. In the left-side navigation pane, click Clusters.
  4. On the V3.0 Clusters tab, click Cluster ID corresponding to the cluster for which you want to set an alert rule.
  5. In the left-side navigation pane, click Monitoring Information.
  6. On the Monitoring Information page, click Alert Rule Settings.
  7. On the Threshold Value Alert tab of the Alert Rules page, click Create Alarm Rule.
  8. On the Create Alert Rule page, configure the following parameters.
    Parameter Description
    Product The name of the service for which you want to set the alert rule. Select AnalyticDB for MySQL 3.0.
    Resource Range The resources to which the alert rule applies. You can select Cluster or All Resources.
    • All Resources: The alert rule applies to all your instances of the specified service. For example, you set Resource Range to All Resources for a rule that triggers an alert if the disk usage of an AnalyticDB for MySQL 3.0 cluster is equal to or greater than 90%. This alert rule applies to all AnalyticDB for MySQL 3.0 clusters within your account. Each alert rule can be applied to up to 1,000 resources for a specified service. If more than 1,000 resources of the specified service are created within your account, the system may not generate an alert even if the rule conditions are met. We recommend that you classify resources of the same service into different application groups based on your business requirements before you set the alert rule.
    • Cluster: The alert rule applies only to the specified cluster. For example, you set Resource Range to Cluster for a rule that triggers an alert if the disk usage of a cluster is equal to or greater than 90%. An alert is triggered only if the disk usage of the specified cluster is equal to or greater than 90%.
    Alert Rule The name of the alert rule.
    Rule Description The details of the alert rule. This parameter defines the alert trigger conditions. For example, you define a rule that triggers alerts if the average disk usage in the last 5 minutes is greater than or equal to 90%. The system checks whether the trigger condition is met once every 5 minutes.
    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.
    Effective Period The period during which the alert rule is effective. The system monitors the metrics and generates alerts only if the alert rule is effective.
    Notification Contact The contact groups to which alert notifications are sent.
    Notification Methods

    The method used to send notifications. Default value: Email + DingTalk (Info).

    Email Remark The additional information that you want to include in the alert notification email.
    HTTP CallBack The URL that can be accessed from the Internet. CloudMonitor uses a POST request to send an alert notification to this URL. Only HTTP requests are supported.
  9. After you configure the preceding parameters, click Confirm.