All Products
Search
Document Center

ApsaraDB RDS:Manage alert rules for PostgreSQL

Last Updated:Mar 28, 2026

ApsaraDB RDS integrates with CloudMonitor to monitor your PostgreSQL instance and send email notifications to your alert contact group when a metric crosses a threshold. Two approaches are available: enable Initiative Alert for instant coverage with seven preset rules, or create custom alert rules for metrics and thresholds tailored to your workload.

How alert rules work

Alert rules sample a metric at a fixed statistical period (for example, every 60 seconds) and trigger an alert when the sampled value exceeds a threshold for a specified number of consecutive periods. For example, if the CPU Utilization threshold is 90% with a statistical period of 60 seconds and a duration of 5 consecutive periods, an alert fires only after CPU stays above 90% for 5 minutes straight — not on a single spike. CloudMonitor then emails all contacts in the configured alert contact group.

Enable Initiative Alert

Initiative Alert applies seven preset rules to your instance instantly, covering the most critical PostgreSQL-specific metrics. No manual threshold configuration is required.

Prerequisites

Before you begin, ensure that you have:

  • An ApsaraDB RDS for PostgreSQL instance

  • An Alibaba Cloud account (the account owner is set as the default alert contact)

Turn on Initiative Alert

  1. Go to the Instances page. In the top navigation bar, select the region where the instance resides, then click the instance ID.

  2. In the left-side navigation pane, click Monitoring and Alerts.

  3. Click the Alerts tab.

  4. In the right-side section of the page, turn on the Initiative Alert switch.

The system immediately begins monitoring the following metrics:

Rule nameMetricStatistical periodAlert threshold
SystemDefault_acs_rds_dashboard_PG_RO_ReadLagSynchronization Latency of Read-only Instances60 secondsAverage ≥ 7,200 seconds for 5 consecutive periods
SystemDefault_acs_rds_dashboard_conn_usageConnections Usage60 secondsAverage ≥ 90% for 5 consecutive periods
SystemDefault_acs_rds_dashboard_local_fs_size_usageDisk Usage60 secondsAverage ≥ 90% for 5 consecutive periods
SystemDefault_acs_rds_dashboard_cpu_usageCPU Utilization60 secondsAverage ≥ 90% for 5 consecutive periods
SystemDefault_acs_rds_dashboard_iops_usageIOPS Utilization60 secondsAverage ≥ 80% for 5 consecutive periods
SystemDefault_acs_rds_dashboard_PG_MaxSlotWalDelayMaximum Replication Slot Latency60 secondsAverage ≥ 1,024 MB for 5 consecutive periods
SystemDefault_acs_rds_dashboard_PG_SwellTimeLongest Transaction Duration60 secondsAverage ≥ 36,000 seconds for 5 consecutive periods

(Optional) Update the alert contact

By default, alert notifications are sent to the Alibaba Cloud account owner. To add or change contacts:

  1. Log on to the Cloud Monitor console.

  2. In the left-side navigation pane, click Alert ContactsDefault Contact Group.

  3. On the Alert Contacts tab, click Create Alert Contact. For details, see Create an alert contact or alert contact group.

  4. On the Alert Contact Group tab, search for Default Contact Group, then click the Edit icon icon.

  5. On the Modify Contact Group panel, update the contacts.

Configure custom alert rules

For metrics not covered by Initiative Alert, or to apply different thresholds, create custom alert rules in CloudMonitor. Alerts are sent by email to all contacts in the alert contact group you specify.

The following metrics are available for custom rules:

Metric
PG_DBAge
PG_InactiveSlots
PG_MaxExecutingSQLTime
PG_MaxSlotWalDelay
PG_RO_ReadLag
PG_RO_StreamingStatus
PG_ReplayLatency
PG_SwellTime
PG_ActiveConnectionsPerCpu
PG_ConnectionsUtilization
PG_CPUUtilization
PG_IOPSUtilization
PG_INODEUtilization
PG_DISKUtilization
PG_MemoryUtilization

Create a custom alert rule

  1. Go to the Instances page. In the top navigation bar, select the region where the instance resides, then click the instance ID.

  2. In the left-side navigation pane, click Monitoring and Alerts.

  3. Click the Alerts tab.

  4. In the right-side section of the page, click Set Alert Rule to open the CloudMonitor console.

  5. Create an alert contact group. For details, see Create an alert contact or alert contact group.

  6. Create an alert rule. For details, see Create an alert rule.

Note

When creating the alert rule, set the Product parameter to ApsaraDB RDS for PostgreSQL.

You can also monitor resources based on tags. For details, see Monitor resources based on tags.