ApsaraDB RDS for PostgreSQL provides Enhanced Monitoring metrics in addition to Standard Monitoring metrics. This topic describes how to view the Enhanced Monitoring metrics of an ApsaraDB RDS for PostgreSQL instance in the ApsaraDB RDS console.

Procedure

  1. Visit the RDS instance list, select a region above, and click the target instance ID.
  2. In the left-side navigation pane, click Monitoring and Alerts.
  3. On the Enhanced Monitoring tab, click Metrics Management. On the OS Metrics tab and DB Metrics tab of the Metrics Management dialog box, select the metrics that you want to view. For more information, see the "References" section of this topic.
    Select metrics
    Note
    • A maximum of 30 metrics can be displayed on the Enhanced Monitoring tab.
    • You can apply the selected metrics to all ApsaraDB RDS for PostgreSQL instances in the region of the current RDS instance. This includes the existing ApsaraDB RDS for PostgreSQL instances and all new ApsaraDB RDS for PostgreSQL instances that you create at a later time.
      • If the current RDS instance is equipped with standard SSDs or enhanced SSDs (ESSDs), you can apply the selected metrics to all ApsaraDB RDS for PostgreSQL instances that are equipped with standard SSDs or ESSDs in the region of the current RDS instance.
      • If the current RDS instance is equipped with local SSDs, you can apply the selected metrics to all ApsaraDB RDS for PostgreSQL instances that are equipped with local SSDs in the region of the current RDS instance.
  4. Click Update indicators. On the Enhanced Monitoring tab, view the metrics that you selected.
  5. On the Enhanced Monitoring tab, specify query criteria based on which you want to filter monitoring data. More features on the Enhanced Monitoring tab
    No. Functionality Description
    Time range You can query monitoring data over a preset time range or a custom time range.
    • The preset time range can be 30 minutes, 1 hour, 2 hours, 6 hours, 1 day, 7 days, or 30 days.
    • The custom time range is specified by a start time and an end time in the following format: YYYY-MM-DD hh:mm:ss - YYYY-MM-DD hh:mm:ss.
    Aggregation method You can specify the method based on which ApsaraDB RDS aggregates monitoring data. The following three aggregation methods are supported:
    • Average
    • Maximum
    • Minimum
    Layout You can adjust the layout in which charts displayed. The following layouts are supported:
    • A column
    • Two columns
    • Three columns
    • Four columns
    Time granularity You can specify the time granularity of the x-axis in each chart that is displayed.
    The time granularity varies based on the time range that you specify. The following relationships exist between the time granularity and the time range:
    • If the time range is less than or equal to 1 hour, the time granularity is 5 seconds.
    • If the time range is greater than 1 hour and less than or equal to 2 hours, the time granularity is 10 seconds.
    • If the time range is greater than 2 hours and less than or equal to 6 hours, the time granularity is 30 seconds.
    • If the time range is greater than 6 hours and less than or equal to 12 hours, the time granularity is 1 minute.
    • If the time range is greater than 12 hours and less than or equal to 1 day, the time granularity is 2 minutes.
    • If the time range is greater than 1 day and less than or equal to 5 days, the time granularity is 10 minutes.
    • If the time range is greater than 5 days and less than or equal to 15 days, the time granularity is 30 minutes.
    • If the time range is greater than 15 days and less than or equal to 30 days, the time granularity is 1 hour.
    Cursor link You can turn on the Cursor link switch. When you move the pointer over a specific point in time on the x-axis of a chart, all charts on the Enhanced Monitoring tab display the monitoring data that is collected at that specific point in time.
    Refresh You can manually refresh the Enhanced Monitoring tab to update monitoring data.

References

The following table describes the OS metrics and database metrics that are supported. In the following table, ticks (√) indicate that a metric is supported, and crosses (×) indicate that a metric is not supported.

OS metrics
Category Metric Description Unit ApsaraDB RDS instance that runs PostgreSQL 9.4 or PostgreSQL 10 with local SSDs ApsaraDB RDS instance that runs PostgreSQL 10, PostgreSQL 11, PostgreSQL 12, or PostgreSQL 13 with standard SSDs or ESSDs
CPU utilization
  • Average value: os.cpu_usage.sys.avg
  • Maximum value: os.cpu_usage.sys.max
  • Minimum value: os.cpu_usage.sys.min
The CPU utilization for the OS. The value of this metric is calculated based on the following formula: CPU utilization for the OS = Number of CPUs that are consumed by the OS/Total number of CPUs. % ✔️ ✔️
  • Average value: os.cpu_usage.user.avg
  • Maximum value: os.cpu_usage.user.max
  • Minimum value: os.cpu_usage.user.min
The CPU utilization for the user. The value of this metric is calculated based on the following formula: CPU utilization for the user = Number of CPUs consumed by the user/Total number of CPUs. % ✔️ ✔️
  • Average value: os.cpu_usage.total.avg
  • Maximum value: os.cpu_usage.total.max
  • Minimum value: os.cpu_usage.total.min
The CPU utilization for the server. The value of this metric is calculated based on the following formula: CPU utilization for the server = Number of CPUs consumed by the server/Total number of CPUs. % ✔️ ✔️
CPU consumption by process
  • Average value: os.cpu_process.backend.avg
  • Maximum value: os.cpu_process.backend.max
  • Minimum value: os.cpu_process.backend.min
The CPU utilization for the backend process. If one CPU is consumed, the CPU utilization is 100%. If two CPUs are consumed, the CPU utilization is 200%. In this way, you can calculate the CPU utilization for the backend process. % ✔️ ✔️
  • Average value: os.cpu_process.bgwriter.avg
  • Maximum value: os.cpu_process.bgwriter.max
  • Minimum value: os.cpu_process.bgwriter.min
The CPU utilization for the bgwriter process. If one CPU is consumed, the CPU utilization is 100%. If two CPUs are consumed, the CPU utilization is 200%. In this way, you can calculate the CPU utilization for the bgwriter process. % ✔️ ✔️
  • Average value: os.cpu_process.checkpoint.avg
  • Maximum value: os.cpu_process.checkpoint.max
  • Minimum value: os.cpu_process.checkpoint.min
The CPU utilization for the checkpoint process. If one CPU is consumed, the CPU utilization is 100%. If two CPUs are consumed, the CPU utilization is 200%. In this way, you can calculate the CPU utilization for the checkpoint process. % ✔️ ✔️
  • Average value: os.cpu_process.logger.avg
  • Maximum value: os.cpu_process.logger.max
  • Minimum value: os.cpu_process.logger.min
The CPU utilization for the logger process. If one CPU is consumed, the CPU utilization is 100%. If two CPUs are consumed, the CPU utilization is 200%. In this way, you can calculate the CPU utilization for the logger process. % ✔️ ✔️
  • Average value: os.cpu_process.pgstat.avg
  • Maximum value: os.cpu_process.pgstat.max
  • Minimum value: os.cpu_process.pgstat.min
The CPU utilization for the pgstat process. If one CPU is consumed, the CPU utilization is 100%. If two CPUs are consumed, the CPU utilization is 200%. In this way, you can calculate the CPU utilization for the pgstat process. % ✔️ ✔️
  • Average value: os.cpu_process.walwriter.avg
  • Maximum value: os.cpu_process.walwriter.max
  • Minimum value: os.cpu_process.walwriter.min
The CPU utilization for the walwriter process. If one CPU is consumed, the CPU utilization is 100%. If two CPUs are consumed, the CPU utilization is 200%. In this way, you can calculate the CPU utilization for the walwriter process. % ✔️ ✔️
  • Average value: os.cpu_process.autovacuum.avg
  • Maximum value: os.cpu_process.autovacuum.max
  • Minimum value: os.cpu_process.autovacuum.min
The CPU utilization for the autovacuum process. If one CPU is consumed, the CPU utilization is 100%. If two CPUs are consumed, the CPU utilization is 200%. In this way, you can calculate the CPU utilization for the autovacuum process. % ✔️ ✔️
  • Average value: os.cpu_process.walsender.avg
  • Maximum value: os.cpu_process.walsender.max
  • Minimum value: os.cpu_process.walsender.min
The CPU utilization for the walsender process. If one CPU is consumed, the CPU utilization is 100%. If two CPUs are consumed, the CPU utilization is 200%. In this way, you can calculate the CPU utilization for the walsender process. % ✔️ ✔️
  • Average value: os.cpu_process.postmaster.avg
  • Maximum value: os.cpu_process.postmaster.max
  • Minimum value: os.cpu_process.postmaster.min
The CPU utilization for the postmaster process. If one CPU is consumed, the CPU utilization is 100%. If two CPUs are consumed, the CPU utilization is 200%. In this way, you can calculate the CPU utilization for the postmaster process. % ✔️ ✔️
IOPS
  • Average value: os.iops.total.avg
  • Maximum value: os.iops.total.max
  • Minimum value: os.iops.total.min
The disk read and write IOPS of the server. Counts/s ✔️
  • Average value: os.iops.read.avg
  • Maximum value: os.iops.read.max
  • Minimum value: os.iops.read.min
The disk read IOPS of the server. Counts/s ✔️
  • Average value: os.iops.write.avg
  • Maximum value: os.iops.write.max
  • Minimum value: os.iops.write.min
The disk write IOPS of the server. Counts/s ✔️
  • Average value: os.iops.data.avg
  • Maximum value: os.iops.data.max
  • Minimum value: os.iops.data.min
The IOPS of the local data disk. Counts/s ✔️
  • Average value: os.iops.wal.avg
  • Maximum value: os.iops.wal.max
  • Minimum value: os.iops.wal.min
The IOPS of the local log disk. Counts/s ✔️
I/O throughout
  • Average value: os.iothroughput.total.avg
  • Maximum value: os.iothroughput.total.max
  • Minimum value: os.iothroughput.total.min
The disk read and write throughput of the server. MB/s ✔️
  • Average value: os.iothroughput.read.avg
  • Maximum value: os.iothroughput.read.max
  • Minimum value: os.iothroughput.read.min
The disk read throughput of the server. MB/s ✔️
  • Average value: os.iothroughput.write.avg
  • Maximum value: os.iothroughput.write.max
  • Minimum value: os.iothroughput.write.min
The disk write throughput of the server. MB/s ✔️
  • Average value: os.iothroughput.data.avg
  • Maximum value: os.iothroughput.data.max
  • Minimum value: os.iothroughput.data.min
The read and write throughput of the local data disk. MB/s ✔️
  • Average value: os.iothroughput.wal.avg
  • Maximum value: os.iothroughput.wal.max
  • Minimum value: os.iothroughput.wal.min
The read and write throughput of the local log disk. MB/s ✔️
Disk usage
  • Average value: os.fs_usage.total.avg
  • Maximum value: os.fs_usage.total.max
  • Minimum value: os.fs_usage.total.min
The disk usage of the server. % ✔️
Disk space
  • Average value: os.fs_size.used.avg
  • Maximum value: os.fs_size.used.max
  • Minimum value: os.fs_size.used.min
The used disk space of the server. MB ✔️
  • Average value: os.fs_size.total.avg
  • Maximum value: os.fs_size.total.max
  • Minimum value: os.fs_size.total.min
The total disk space of the server. MB ✔️
  • Average value: os.fs_size.log_dir.avg
  • Maximum value: os.fs_size.log_dir.max
  • Minimum value: os.fs_size.log_dir.min
The size of log files. This includes audit log files, error log files, and slow SQL log files. MB ✔️ ✔️
  • Average value: os.fs_size.wal_dir.avg
  • Maximum value: os.fs_size.wal_dir.max
  • Minimum value: os.fs_size.wal_dir.min
The size of write-ahead logging (WAL) files. MB ✔️ ✔️
  • Average value: os.fs_size.base_dir.avg
  • Maximum value: os.fs_size.base_dir.max
  • Minimum value: os.fs_size.base_dir.min
The size of data files. This excludes log files and WAL files. MB ✔️ ✔️
Network traffic
  • Average value: os.network.rx.avg
  • Maximum value: os.network.rx.max
  • Minimum value: os.network.rx.min
The throughput of inbound traffic of the server. MB/s ✔️
  • Average value: os.network.tx.avg
  • Maximum value: os.network.tx.max
  • Minimum value: os.network.tx.min
The throughput of outbound traffic of the server. MB/s ✔️
Database metrics
Note For more information about database metrics, see the PostgreSQL documentation.
Category Metric Description Unit ApsaraDB RDS instance that runs PostgreSQL 9.4 or PostgreSQL 10 with local SSDs ApsaraDB RDS instance that runs PostgreSQL 10, PostgreSQL 11, PostgreSQL 12, or PostgreSQL 13 with standard SSDs or ESSDs
Shared buffer hit ratio
  • Average value: db.buffers.hit_ratio.avg
  • Maximum value: db.buffers.hit_ratio.max
  • Minimum value: db.buffers.hit_ratio.min
The proportion of requests for which the requested content is hit in the shared buffers. % ✔️ ✔️
Shared buffer hits
  • Average value: db.buffers.blks_hit.avg
  • Maximum value: db.buffers.blks_hit.max
  • Minimum value: db.buffers.blks_hit.min
The number of requests for which the requested content is hit in the shared buffers per second. Blocks/s ✔️ ✔️
I/O
  • Average value: db.io.blks_read.avg
  • Maximum value: db.io.blks_read.max
  • Minimum value: db.io.blks_read.min
The number of operations that are performed by the backend process per second to read data from the disks to the buffers. Counts/s ✔️ ✔️
  • Average value: db.io.buffers_backend.avg
  • Maximum value: db.io.buffers_backend.max
  • Minimum value: db.io.buffers_backend.min
The number of operations that are performed by the backend process per second to write data from the buffers to the disks. Counts/s ✔️ ✔️
  • Average value: db.io.buffers_checkpoint.avg
  • Maximum value: db.io.buffers_checkpoint.max
  • Minimum value: db.io.buffers_checkpoint.min
The number of operations that are performed by the checkpoint process per second to write data from the buffers to the disks. Counts/s ✔️ ✔️
  • Average value: db.io.buffers_clean.avg
  • Maximum value: db.io.buffers_clean.max
  • Minimum value: db.io.buffers_clean.min
The number of operations that are performed by the bgwriter process per second to write data from the buffers to the disks. Counts/s ✔️ ✔️
  • Average value: db.io.buffers_backend_fsync.avg
  • Maximum value: db.io.buffers_backend_fsync.max
  • Minimum value: db.io.buffers_backend_fsync.min
The number of times that the backend process calls the fsync() function on the disks per second. Counts/s ✔️ ✔️
Checkpoint write duration
  • Average value: db.checkpoint.checkpoints_sync_time.avg
  • Maximum value: db.checkpoint.checkpoints_sync_time.max
  • Minimum value: db.checkpoint.checkpoints_sync_time.min
The amount of time that the checkpoint process spends per second in running the fsync() function on the disks. ms/s ✔️ ✔️
  • Average value: db.checkpoint.checkpoints_write_time.avg
  • Maximum value: db.checkpoint.checkpoints_write_time.max
  • Minimum value: db.checkpoint.checkpoints_write_time.min
The amount of time that the checkpoint process spends per second in writing data from the buffers to the disks. ms/s ✔️ ✔️
Checkpoint quantity
  • Average value: db.checkpoint.checkpoints_timed.avg
  • Maximum value: db.checkpoint.checkpoints_timed.max
  • Minimum value: db.checkpoint.checkpoints_timed.min
The number of checkpoint processes that are scheduled by the database engine per second. Counts/s ✔️ ✔️
  • Average value: db.checkpoint.checkpoints_req.avg
  • Maximum value: db.checkpoint.checkpoints_req.max
  • Minimum value: db.checkpoint.checkpoints_req.min
The number of checkpoint processes that are requested by the user per second. Counts/s ✔️ ✔️
Connections
  • Average value: db.connections.active.avg
  • Maximum value: db.connections.active.max
  • Minimum value: db.connections.active.min
The number of connections in the active state. Counts ✔️ ✔️
  • Average value: db.connections.waiting.avg
  • Maximum value: db.connections.waiting.max
  • Minimum value: db.connections.waiting.min
The number of connections in the waiting state. Counts ✔️ ✔️
  • Average value: db.connections.idle.avg
  • Maximum value: db.connections.idle.max
  • Minimum value: db.connections.idle.min
The number of connections in the idle state. Counts ✔️ ✔️
  • Average value: db.connections.total.avg
  • Maximum value: db.connections.total.max
  • Minimum value: db.connections.total.min
The total number of connections. Counts ✔️ ✔️
  • Average value: db.connections.spec.avg
  • Maximum value: db.connections.spec.max
  • Minimum value: db.connections.spec.min
The maximum number of connections that are allowed. Counts ✔️ ✔️
TPS
  • Average value: db.transactions.xact_commit.avg
  • Maximum value: db.transactions.xact_commit.max
  • Minimum value: db.transactions.xact_commit.min
The number of write transactions that are committed per second. Counts/s ✔️ ✔️
  • Average value: db.transactions.xact_rollback.avg
  • Maximum value: db.transactions.xact_rollback.max
  • Minimum value: db.transactions.xact_rollback.min
The number of write transactions that are rolled back per second. Counts/s ✔️ ✔️
Transaction status
  • Average value: db.transactions.active.avg
  • Maximum value: db.transactions.active.max
  • Minimum value: db.transactions.active.min
The number of transactions in the active state. Counts ✔️ ✔️
  • Average value: db.transactions.waiting.avg
  • Maximum value: db.transactions.waiting.max
  • Minimum value: db.transactions.waiting.min
The number of transactions in the waiting state. Counts ✔️ ✔️
  • Average value: db.transactions.idle.avg
  • Maximum value: db.transactions.idle.max
  • Minimum value: db.transactions.idle.min
The number of transactions in the idle state. We recommend that you check and process these transactions at the earliest opportunity. Counts ✔️ ✔️
SQL
  • Average value: db.sql.tup_returned.avg
  • Maximum value: db.sql.tup_returned.max
  • Minimum value: db.sql.tup_returned.min
The number of rows that are returned per second. Tuples/s ✔️ ✔️
  • Average value: db.sql.tup_fetched.avg
  • Maximum value: db.sql.tup_fetched.max
  • Minimum value: db.sql.tup_fetched.min
The number of rows that are read per second. Tuples/s ✔️ ✔️
  • Average value: db.sql.tup_inserted.avg
  • Maximum value: db.sql.tup_inserted.max
  • Minimum value: db.sql.tup_inserted.min
The number of rows that are inserted per second. Tuples/s ✔️ ✔️
  • Average value: db.sql.tup_deleted.avg
  • Maximum value: db.sql.tup_deleted.max
  • Minimum value: db.sql.tup_deleted.min
The number of rows that are deleted per second. Tuples/s ✔️ ✔️
  • Average value: db.sql.tup_updated.avg
  • Maximum value: db.sql.tup_updated.max
  • Minimum value: db.sql.tup_updated.min
The number of rows that are updated per second. Tuples/s ✔️ ✔️
Slow SQL logs
  • Average value: db.slow_sql.one_second.avg
  • Maximum value: db.slow_sql.one_second.max
  • Minimum value: db.slow_sql.one_second.min
The number of SQL statements that have been running for 1 second. Counts ✔️ ✔️
  • Average value: db.slow_sql.three_seconds.avg
  • Maximum value: db.slow_sql.three_seconds.max
  • Minimum value: db.slow_sql.three_seconds.min
The number of SQL statements that have been running for 3 seconds. Counts ✔️ ✔️
  • Average value: db.slow_sql.five_seconds.avg
  • Maximum value: db.slow_sql.five_seconds.max
  • Minimum value: db.slow_sql.five_seconds.min
The number of SQL statements that have been running for 5 seconds. Counts ✔️ ✔️
Long transactions
  • Average value: db.long_transactions.active_one_second.avg
  • Maximum value: db.long_transactions.active_one_second.max
  • Minimum value: db.long_transactions.active_one_second.min
The number of transactions that have been running for 1 second. Counts ✔️ ✔️
  • Average value: db.long_transactions.active_three_seconds.avg
  • Maximum value: db.long_transactions.active_three_seconds.max
  • Minimum value: db.long_transactions.active_three_seconds.min
The number of transactions that have been running for 3 seconds. Counts ✔️ ✔️
  • Average value: db.long_transactions.idle_one_second.avg
  • Maximum value: db.long_transactions.idle_one_second.max
  • Minimum value: db.long_transactions.idle_one_second.min
The number of transactions that have been idle for 1 second. Counts ✔️ ✔️
  • Average value: db.long_transactions.idle_three_seconds.avg
  • Maximum value: db.long_transactions.idle_three_seconds.max
  • Minimum value: db.long_transactions.idle_three_seconds.min
The number of transactions that have been idle for 3 seconds. Counts ✔️ ✔️
  • Average value: db.long_transactions.idle_five_seconds.avg
  • Maximum value: db.long_transactions.idle_five_seconds.max
  • Minimum value: db.long_transactions.idle_five_seconds.min
The number of transactions that have been idle for 5 seconds. Counts ✔️ ✔️
  • Average value: db.long_transactions.two_pc_one_second.avg
  • Maximum value: db.long_transactions.two_pc_one_second.max
  • Minimum value: db.long_transactions.two_pc_one_second.min
The number of two-phase transactions that have been running for 1 second. Counts ✔️ ✔️
  • Average value: db.long_transactions.two_pc_three_seconds.avg
  • Maximum value: db.long_transactions.two_pc_three_seconds.max
  • Minimum value: db.long_transactions.two_pc_three_seconds.min
The number of two-phase transactions that have been running for 3 seconds. Counts ✔️ ✔️
  • Average value: db.long_transactions.two_pc_five_seconds.avg
  • Maximum value: db.long_transactions.two_pc_five_seconds.max
  • Minimum value: db.long_transactions.two_pc_five_seconds.min
The number of two-phase transactions that have been running for 5 seconds. Counts ✔️ ✔️
Temporary files
  • Average value: db.temp.temp_files.avg
  • Maximum value: db.temp.temp_files.max
  • Minimum value: db.temp.temp_files.min
The number of temporary files that are generated per second. Counts/s ✔️ ✔️
Temporary file size
  • Average value: db.temp.temp_bytes.avg
  • Maximum value: db.temp.temp_bytes.max
  • Minimum value: db.temp.temp_bytes.min
The size of temporary files that are generated per second. Bytes/s ✔️ ✔️
Duration of bloat
  • Average value: db.swell.swell_time.avg
  • Maximum value: db.swell.swell_time.max
  • Minimum value: db.swell.swell_time.min
The execution duration of the longest transaction. s ✔️ ✔️
Maximum transaction ID
  • Average value: db.age.max_age.avg
  • Maximum value: db.age.max_age.max
  • Minimum value: db.age.max_age.min
The maximum transaction ID on the RDS instance. xids ✔️ ✔️
Synchronization latency to read-only instances
  • Average value: db.ro_replica.replay_lag.avg
  • Maximum value: db.ro_replica.replay_lag.max
  • Minimum value: db.ro_replica.replay_lag.min
The latency at which the attached read-only RDS instances replay logs. s ✔️
  • Average value: db.ro_replica.write_lag.avg
  • Maximum value: db.ro_replica.write_lag.max
  • Minimum value: db.ro_replica.write_lag.min
The latency at which the attached read-only RDS instances write data. s ✔️
  • Average value: db.ro_replica.flush_lag.avg
  • Maximum value: db.ro_replica.flush_lag.max
  • Minimum value: db.ro_replica.flush_lag.min
The latency at which the attached read-only RDS instances flush data. s ✔️
Logical replication
  • Average value: db.slots.max_slot_wal_delay.avg
  • Maximum value: db.slots.max_slot_wal_delay.max
  • Minimum value: db.slots.max_slot_wal_delay.min
The maximum latency that is allowed for the replication slot to replicate WAL records. The WAL records that follow the replication start position must be retained. If the replication start position indicates a WAL record that has a relatively high log sequence number (LSN), WAL records may pile up. In this case, we recommend that you make sure these WAL records are processed at the earliest opportunity. MB ✔️ ✔️