Help Center/ Relational Database Service_RDS for PostgreSQL/ Best Practices/ Suggestions on RDS for PostgreSQL Metric Alarm Configurations
Updated on 2026-03-23 GMT+08:00

Suggestions on RDS for PostgreSQL Metric Alarm Configurations

You can set alarm rules on Cloud Eye to customize the monitored objects and notification policies and keep track of the instance status. This topic describes how to configure RDS for PostgreSQL metric alarm rules.

Creating a Metric Alarm Rule

Metric Alarm Configuration Suggestions

Table 1 Suggestions on RDS for PostgreSQL metric alarm configurations

Metric ID

Name

Metric Description

Threshold in Best Practices

Alarm Severity in Best Practices

Handling Suggestion

rds001_cpu_util

CPU Usage

CPU usage of the monitored object

Raw data > 80% for three consecutive periods

Major

  1. Rectify the fault by referring to Troubleshooting High CPU Usage.
  2. If the CPU usage remains high due to increased workloads, upgrade the instance specifications. For details, see Changing a DB Instance Class.

rds002_mem_util

Memory Usage

Memory usage of the monitored object

Raw data > 90% for three consecutive periods

Major

  1. Rectify the fault by referring to Troubleshooting High Memory Usage.
  2. If the memory usage remains high due to increased workloads, upgrade the instance specifications. For details, see Changing a DB Instance Class.

rds039_disk_util

Storage Space Usage

Storage space usage of the monitored object

Raw data > 80% for three consecutive periods

Major

  1. Rectify the fault by referring to Troubleshooting High Storage Space Usage.
  2. If the storage space usage remains high due to increased workloads, scale up the storage space. For details, see Scaling Storage Space.

rds045_oldest_replication_slot_lag

Oldest Replication Slot Lag

Lagging size of the most lagging replica in terms of WAL data received

Raw data > 20,480 MB for one period

Major

Rectify the fault by referring to Troubleshooting High Oldest Replication Slot Lag or Replication Lag.

rds046_replication_lag

Replication Lag

Replication lag

Raw data > 600s for three consecutive periods

Major

rds083_conn_usage

Connection Usage

Percent of used PostgreSQL connections to the total number of connections

Raw data > 80% for three consecutive periods

Major

  1. Evaluate the impact of increased connections on workloads and release unnecessary connections. For details, see What Do I Do If There Are Too Many Database Connections?
  2. Set the maximum number of connections to an appropriate value. For details, see What Is the Maximum Number of Connections to an RDS for PostgreSQL Instance?

active_connections

Active Connections

Number of active database connections

Raw data > [vCPUs x 2] for one period

Major

Rectify the fault by referring to Troubleshooting Abnormal Connections and Active Connections

oldest_transaction_duration

Oldest Active Transaction Duration

Length of time since the start of the transaction that has been active longer than any other current transaction

Set the threshold as required. Reference value: Raw data > 7,200,000 ms for one period

Major

Rectify the fault by referring to Troubleshooting Long-Running Transactions.

oldest_transaction_duration_2pc

Oldest Two-Phase Commit Transaction Duration

Length of time that has elapsed since the start of the transaction that has been prepared for two-phase commit longer than any other current transaction

Set the threshold as required. Reference value: Raw data > 7,200,000 ms for one period

Major

db_max_age

Maximum Database Age

Maximum age of the current database, which is the value of max(age(datfrozenxid)) in the pg_database table

Raw data > 1,000,000,000 for one period

Major

Rectify the fault by referring to Troubleshooting Database Age Increase Problem.

slow_sql_three_second

Number of SQL Statements Executed for More Than 3s

Number of slow SQL statements whose execution time is longer than 3s

This metric shows an instantaneous value at the collection time instead of an accumulated value within 1 minute.

Set the threshold as required. Reference value: Raw data > [vCPUs x 2] for one period

Major

Rectify the fault by referring to Troubleshooting SQL Statements That Have Been Executed for 3s or 5s.

slow_sql_five_second

Number of SQL Statements Executed for More Than 5s

Number of slow SQL statements whose execution time is longer than 5s

This metric shows an instantaneous value at the collection time instead of an accumulated value within 1 minute.

Set the threshold as required. Reference value: Raw data > [vCPUs x 2] for one period

Major

inactive_logical_replication_slot

Inactive Logical Replication Slots

Number of inactive logical replication slots

Raw data > 1 for three consecutive periods

Major

Rectify the fault by referring to Troubleshooting Inactive Logical Replication Slots.