Set up threshold-based alert rules in the PolarDB for MySQL console to detect and respond to exceptions in your clusters, PolarProxy, and compute nodes.
Prerequisites
Before you begin, ensure that you have:
A PolarDB for MySQL cluster
An alert contact group configured in CloudMonitor. To create one, see Create an alert contact or alert contact group
Create an alert rule
Log on to the PolarDB console.
In the upper-left corner, select the region where your cluster is deployed.
Find the cluster and click the cluster ID.
In the left-side navigation pane, choose Performance Monitoring.
Click Add Alert Rule.
On the Create Alert Rule page, configure the following parameters.
Parameter Description Product The service to monitor. Use the default value PolarDB for MySQL (New). Resource Range The scope of resources the rule applies to. Valid values: All Resources (any cluster that meets the rule conditions), Application Groups (clusters in the specified application groups), Instances (a specific cluster). Rule Description The alert condition. Click Add Rule, then in the Add Rule Description panel specify the rule name, metric type, metric, threshold, and alert level, and click Next Step. For more information, see Create a threshold-triggered alert rule. Mute For How long to wait before resending an alert notification if the issue persists. Range: 5 minutes to 24 hours. Effective Period The time window during which the alert rule is active. CloudMonitor sends notifications only within this period and records events when the validity period expires. Alert Contact Group The contact group that receives alert notifications. A group can contain one or more contacts. Tag Optional tags for the alert rule. Each tag consists of a key and a value. Method to handle alerts when no monitoring data is found How to handle the alert when monitoring data is unavailable. Valid values: Do not do anything (default), Send alert notifications, Treated as normal. (Optional) Expand Advanced Settings to configure additional notification and automation options.
Advanced setting Description Alert Callback A public HTTP URL that CloudMonitor calls with an HTTP POST request when an alert fires. Only HTTP URLs are supported. To verify connectivity, click Test next to the URL, configure Template Type and Language in the WebHook test panel, then click Test. Click Close when done. Auto Scaling When turned on, triggers the specified scaling rule when an alert fires. Requires Region, ESS Group, and ESS Rule. For setup, see Manage scaling groups and Manage scaling rules. Log Service When turned on, writes alert details to a Logstore in Log Service when an alert fires. Requires Region, ProjectName, and Logstore. To create a project and Logstore, see Getting started. Message Service - Topic When turned on, writes alert details to a topic in Simple Message Queue (formerly MNS) when an alert fires. Requires Region and topicName. To create a topic, see Create a topic. Click OK.
What's next
To view and manage existing alert rules, go to Performance Monitoring in the left-side navigation pane.