AnalyticDB for MySQL integrates with CloudMonitor to monitor cluster metrics in real time. When a metric crosses a threshold you define, CloudMonitor notifies the contacts in the alert contact groups you specify.
You can configure alert rules for the following metrics:
CPU utilization
Disk usage
Input/Output Operations Per Second (IOPS)
Query duration
Number of database connections
When you create an alert rule, you can route notifications through one or more channels:
Alert contact group — Email or SMS to contacts you define in CloudMonitor
Alert callback — HTTP POST to a publicly accessible URL
Auto Scaling — Trigger an Auto Scaling rule in response to the alert
Log Service — Write alert details to Simple Log Service
Simple Message Queue (formerly MNS) - Topic — Publish alert details to a Message Service topic
Disk usage has two critical thresholds: at 80%, CloudMonitor sends a notification; at 90%, CloudMonitor sends a notification, locks the cluster, and denies write requests. In this case, an error occurs if you write data. Read requests are not affected. Each contact receives up to four disk usage notifications per day.
For more information about CloudMonitor, see What is Cloud Monitor?. For a full list of available metrics, see AnalyticDB for MySQL V3.0.
Prerequisites
Before you begin, ensure that you have:
An AnalyticDB for MySQL cluster on the Data Warehouse Edition
At least one alert contact group in CloudMonitor (see Create an alert contact or alert contact group)
Create an alert rule
Log on to the AnalyticDB for MySQL console.
In the upper-left corner, select a region.
In the left-side navigation pane, click Clusters.
On the Data Warehouse Edition tab, find your cluster and click its Cluster ID.
In the left-side navigation pane, click Monitoring and Alerts.
On the Monitoring Information page, click Alert Rule Settings in the upper-right corner.
On the Alert Rules page, click Create Alert Rule.
In the Create Alert Rule panel, configure the parameters described in the following sections.
Scope and trigger condition
| Parameter | Description |
|---|---|
Product | The name of the service for which you want to configure the alert rule. Select AnalyticDB for MySQL V3.0 - Data Warehouse Edition.云原生数据仓库AnalyticDB MySQL版 5.0 |
| Resource Range | The resources the rule applies to. All Resources applies the rule to every AnalyticDB for MySQL cluster in your account (up to 1,000 resources per service). Instances applies the rule only to the clusters you select. If your account has more than 1,000 clusters, use application groups to classify them before selecting All Resources, or the system may not generate alerts even when conditions are met.
|
| Rule Description | The conditions that trigger the alert. Click Add Rule, then configure the following in the Configure Rule Description panel: Alert Rule, Metric Type, Metric, Threshold and Alert Level, and Chart Preview. Click OK. For example: metric = disk usage, operator = greater than or equal to, threshold = 80%. |
Notification timing
| Parameter | Description |
|---|---|
| Mute Period | How long CloudMonitor waits before resending a notification for an ongoing alert. Valid values: 5 Minutes, 15 Minutes, 30 Minutes, 60 Minutes, 3 Hours, 6 Hours, 12 Hours, 24 Hours. CloudMonitor does not resend the notification while the alert is within the mute period. After the mute period expires and the alert is still active, CloudMonitor resends the notification. |
| Effective Period | The time window during which the rule is active. CloudMonitor evaluates the rule and sends notifications only within this window. |
Notification channels
| Parameter | Description |
|---|---|
| Alert Contact Group | The contact group that receives alert notifications. A contact group can contain one or more alert contacts. |
Advanced notification channels
Click Advanced Settings to configure the following optional channels.
| Parameter | Description |
|---|---|
| Alert Callback | A publicly accessible HTTP URL. Only HTTP requests are supported. When an alert fires, CloudMonitor sends a POST request to this URL. For setup instructions, see Use the alert callback feature to send notifications about threshold-triggered alerts. |
| Auto Scaling | When enabled and an alert fires, triggers the specified scaling rule. Configure Region, ESS Group, and ESS Rule. See Manage scaling groups and Configure scaling rules. |
| Log Service | When enabled and an alert fires, writes alert details to Simple Log Service. Configure Region, Project Name, and Logstore. See Collect and analyze ECS text logs using LoongCollector. |
| Simple Message Queue (formerly MNS) - Topic | When enabled and an alert fires, publishes alert details to a topic in Simple Message Queue. Select a region and a topic. See Create a topic. |
| Method to handle alerts when no monitoring data is found | Controls behavior when no metric data is available. Options: Do not do anything (default), Send alert notifications, Treated as normal. |
| Tag | Key-value pairs attached to alert notifications. Specify multiple pairs as needed. |
Click Confirm.
What's next
To view active alerts and alert history, go to Monitoring and Alerts in the cluster's left-side navigation pane.
To manage contacts and contact groups, see Create an alert contact or alert contact group.