This topic describes how to configure an alert rule for an AnalyticDB for PostgreSQL instance to monitor resource usage. If the conditions specified in an alert rule are met, the system notifies all contacts in the specified contact groups.
Background information
The monitoring and alerting feature of AnalyticDB for PostgreSQL is implemented by using 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.
Instance resource type | Threshold-triggered alert | Event-triggered alert |
---|---|---|
Elastic storage mode | Supported | Not supported |
Reserved storage mode | Supported | Supported |
View monitoring data
Configure a threshold-triggered alert
- In the CloudMonitor console, move the pointer over a chart and click the alert icon to configure a threshold-triggered
alert for the corresponding metric.
- On the Create Alert Rule page, configure an alert rule. To configure multiple alert
rules, click Add Alert Rule in the Set Alert Rules section. You can create an individual alert rule for each
metric. If the value of a metric exceeds the related threshold, the system sends you
an alert notification.
- Metric: For information about the metrics and recommended settings, see Metrics and system events.
- 1Minute cycle: The monitoring data within 1 minute is aggregated into one monitoring data point for comparison with the specified threshold. CloudMonitor provides one data point per minute. If you select 1Minute cycle, one data point is generated and no aggregation is required. If you select 5Minute cycle, five data points are generated and the system aggregates the five data points into a single data point.
- Repeat: If you select Continue for 3 periods for 1Minute cycle, the alert is triggered after the aggregated metric value exceeds the threshold for 3 consecutive minutes (for 3 repeats).
- Average, Max. Value, and Min. Value: If you select 5Minute cycle, five data points must be aggregated. Assume that the five data points are 10, 20, 30, 40, and 50. The average value is 30, the maximum value is 50, and the minimum value is 10. You can specify a threshold for the average value, the maximum value, or the minimum value.
- instance_component: You can select a specific server or component for which you want to create the alert rule. You can also select All.
- Mute for: This parameter specifies the interval at which an alert notification is sent if the issue is not rectified after the first notification.
- Select an existing contact group or create a contact group.
- (Optional) Enter the email content.
- Click Confirm to go to the Alert Rules page. The created threshold-triggered alert rule is displayed.
On the Threshold Value Alert tab, you can view the alert state or alert logs. You can also disable the alert.
Configure an event-triggered alert
- In the CloudMonitor console, choose .
- On the Event Alert tab, click Create Event Alert.
- Product Type: Select AnalyticDB for PostgreSQL.
- Event Type: Select All types or a specific type.
- Event Level: Select All Levels or a specific level.
- Event Name: Select All Events or a specific event.
For more information about system events, see Metrics and system events.
- Set Contact Group and Notification Method, and then click OK.
On the Event Alert tab, you can view the alert state or alert logs. You can also disable the alert.