|
Kategori
|
Metrik
|
Deskripsi
|
Unit
|
Local disk instance
|
Cloud disk instance
|
|
Connections
|
db.connections.active
|
Number of active connections
|
Count
|
✔️
|
✔️
|
|
db.connections.waiting
|
Number of waiting connections
|
Count
|
✔️
|
✔️
|
|
db.connections.idle
|
Number of idle connections
|
Count
|
✔️
|
✔️
|
|
db.connections.total
|
Total number of connections
|
Count
|
✔️
|
✔️
|
|
db.connections.spec
|
Maximum connections allowed by the instance specification
|
Count
|
✔️
|
✔️
|
|
SQL
|
db.sql.tup_returned
|
Rows returned per second
|
Tuples/s
|
✔️
|
✔️
|
|
db.sql.tup_fetched
|
Rows fetched per second
|
Tuples/s
|
✔️
|
✔️
|
|
db.sql.tup_inserted
|
Rows inserted per second
|
Tuples/s
|
✔️
|
✔️
|
|
db.sql.tup_deleted
|
Rows deleted per second
|
Tuples/s
|
✔️
|
✔️
|
|
db.sql.tup_updated
|
Rows updated per second
|
Tuples/s
|
✔️
|
✔️
|
|
Slow SQL
|
db.slow_sql.one_second
|
Number of SQL statements running for 1 second or longer
|
Count
|
✔️
|
✔️
|
|
db.slow_sql.three_seconds
|
Number of SQL statements running for 3 seconds or longer
|
Count
|
✔️
|
✔️
|
|
db.slow_sql.five_seconds
|
Number of SQL statements running for 5 seconds or longer
|
Count
|
✔️
|
✔️
|
|
Long-running transactions
|
db.long_transactions.active_one_second
|
Number of transactions active for 1 second or longer
|
Count
|
✔️
|
✔️
|
|
db.long_transactions.active_three_seconds
|
Number of transactions active for 3 seconds or longer
|
Count
|
✔️
|
✔️
|
|
db.long_transactions.idle_one_second
|
Number of transactions idle for 1 second or longer
|
Count
|
✔️
|
✔️
|
|
db.long_transactions.idle_three_seconds
|
Number of transactions idle for 3 seconds or longer
|
Count
|
✔️
|
✔️
|
|
db.long_transactions.idle_five_seconds
|
Number of transactions idle for 5 seconds or longer
|
Count
|
✔️
|
✔️
|
|
db.long_transactions.two_pc_one_second
|
Number of two-phase transactions in the prepared state for 1 second or longer
|
Count
|
✔️
|
✔️
|
|
db.long_transactions.two_pc_three_seconds
|
Number of two-phase transactions in the prepared state for 3 seconds or longer
|
Count
|
✔️
|
✔️
|
|
db.long_transactions.two_pc_five_seconds
|
Number of two-phase transactions in the prepared state for 5 seconds or longer
|
Count
|
✔️
|
✔️
|
|
Temporary files
|
db.temp.temp_files
|
Number of temporary files created per second
|
Counts/s
|
✔️
|
✔️
|
|
Temporary file size
|
db.temp.temp_bytes
|
Amount of data written to temporary files per second
|
Bytes/s
|
✔️
|
✔️
|
|
Maximum database age
|
db.age.max_age.
|
Maximum database age
|
xids
|
✔️
|
✔️
|
|
Read-only instance replication lag
|
db.ro_replica.replay_lag
|
Replay lag of the read-only instance
|
s
|
✔️
|
✔️
|
|
db.ro_replica.write_lag
|
Write lag of the read-only instance
|
s
|
✔️
|
✔️
|
|
db.ro_replica.flush_lag
|
Flush lag of the read-only instance
|
s
|
✔️
|
✔️
|
|
Database memory distribution
|
db.mem_size.spec
|
Memory size defined by the instance specification
|
MB
|
✔️
|
✔️
|
|
db.mem_size.shared_buffer
|
Memory usage of shared_buffer
Catatan
The primary data cache. It grows to 25% of the total memory and then stabilizes.
|
MB
|
✔️
|
✔️
|
|
db.mem_size.rss
|
Resident Set Size (RSS) memory usage
Catatan
Memory allocated by PostgreSQL processes using malloc. This usage depends on the number of connections and the SQL workload. It elastically shares 75% of the total memory with db.mem_size.cache, typically consuming around 10%.
-
If usage exceeds 75%, an OOM error will occur.
-
As RSS usage increases, the memory available for db.mem_size.cache decreases.
|
MB
|
✔️
|
✔️
|
|
db.mem_size.free
|
Amount of free memory
Catatan
Completely unused memory. This value approaches zero as PostgreSQL allocates it to db.mem_size.cache to maximize memory use.
|
MB
|
✔️
|
✔️
|
|
db.mem_size.cache
|
Memory usage of the page cache
Catatan
The secondary data cache. It elastically shares 75% of the total memory with db.mem_size.rss, typically consuming around 65%.
-
This memory can be reclaimed by the OS to prevent OOM errors.
-
To improve memory use, db.mem_size.cache uses the available memory from db.mem_size.free.
|
MB
|
✔️
|
✔️
|
|
Available database memory
|
db.mem_available.size
|
Amount of available database memory
Catatan
Available memory = Free memory + Reclaimable cache memory. As db.mem_size.rss increases, the system uses this memory to prevent OOM errors.
|
MB
|
✔️
|
✔️
|
|
Available database memory ratio
|
db.mem_available.ratio
|
Percentage of available database memory
|
%
|
✔️
|
✔️
|
|
SharedBuffers hit ratio
|
db.buffers.hit_ratio
|
Cache hit ratio for shared_buffers
|
%
|
✔️
|
✔️
|
|
SharedBuffers hit count
|
db.buffers.blks_hit
|
Number of hits in shared_buffers per second
|
Blocks/s
|
✔️
|
✔️
|
|
IO
|
db.io.blks_read
|
Number of disk read operations per second by backend processes (OS buffered read)
|
Counts/s
|
✔️
|
✔️
|
|
db.io.buffers_backend
|
Number of disk write operations per second by backend processes (OS buffered write)
|
Counts/s
|
✔️
|
✔️
|
|
db.io.buffers_checkpoint
|
Number of disk write operations per second by the checkpoint process (OS buffered write)
|
Counts/s
|
✔️
|
✔️
|
|
db.io.buffers_clean
|
Number of disk write operations per second by the background writer (bgwriter) process (OS buffered write)
|
Counts/s
|
✔️
|
✔️
|
|
db.io.buffers_backend_fsync
|
Number of fsync operations per second by backend processes
|
Counts/s
|
✔️
|
✔️
|
|
Checkpoint count
|
db.checkpoint.checkpoints_timed
|
Number of timed checkpoints per second
|
Counts/s
|
✔️
|
✔️
|
|
db.checkpoint.checkpoints_req
|
Number of requested checkpoints per second
|
Counts/s
|
✔️
|
✔️
|
|
Transaction TPS
|
db.transactions.xact_commit
|
Number of transactions committed per second
|
Counts/s
|
✔️
|
✔️
|
|
db.transactions.xact_rollback
|
Number of transactions rolled back per second
|
Counts/s
|
✔️
|
✔️
|
|
Transaction status
|
db.transactions.active
|
Number of active transactions
|
Count
|
✔️
|
✔️
|
|
db.transactions.waiting
|
Number of waiting transactions
|
Count
|
✔️
|
✔️
|
|
db.transactions.idle
|
Number of transactions in the "idle in transaction" state. Note: This is an undesirable state that requires prompt attention.
|
Count
|
✔️
|
✔️
|
|
Bloat point
|
db.swell.swell_time
|
Bloat point: The execution time of the longest-running transaction
|
s
|
✔️
|
✔️
|
|
Replication slot lag
|
db.slots.max_slot_wal_delay
|
Maximum WAL replication lag among all replication slots. WAL files beyond the replication point of a slot are retained. A large value indicates WAL accumulation and should be addressed promptly.
|
MB
|
✔️
|
✔️
|
|
Checkpoint write time
|
db.checkpoint.checkpoints_sync_time
|
Average disk fsync time per second for the checkpoint process
|
ms/s
|
✔️
|
✔️
|
|
db.checkpoint.checkpoints_write_time
|
Average disk write time per second for the checkpoint process (OS buffered write)
|
ms/s
|
✔️
|
✔️
|
|
PgBouncer connections
|
db.pgbouncer.client_connections.active
|
Number of active client connections
|
Count
|
❌
|
✔️
|
|
db.pgbouncer.client_connections.waiting
|
Number of waiting client connections
|
Count
|
❌
|
✔️
|
|
db.pgbouncer.server_connections.active
|
Number of active server connections
|
Count
|
❌
|
✔️
|
|
db.pgbouncer.server_connections.idle
|
Number of idle server connections
|
Count
|
❌
|
✔️
|
|
db.pgbouncer.total_pooled_connections
|
Total number of connections in the connection pool
|
Count
|
❌
|
✔️
|
|
db.pgbouncer.num_pools
|
Number of connection pools
|
Count
|
❌
|
✔️
|