PostgreSQL Metrics
See also: PostgreSQL integration information.
Metric Name | Type | Description |
---|---|---|
postgresql.seq_scans | gauge | The number of sequential scans initiated on this table. |
postgresql.index_scans | gauge | The number of index scans initiated on this table. |
postgresql.index_rows_fetched | gauge | The number of live rows fetched by index scans. |
postgresql.rows_hot_updated | gauge | The number of rows HOT updated, meaning no separate index update was needed. |
postgresql.live_rows | gauge | The estimated number of live rows. |
postgresql.dead_rows | gauge | The estimated number of dead rows. |
postgresql.index_rows_read | gauge | The number of index entries returned by scans on this index. |
postgresql.table_size | gauge | The total disk space used by the specified table. Includes TOAST, free space map, and visibility map. Excludes indexes. |
postgresql.index_size | gauge | The total disk space used by indexes attached to the specified table. |
postgresql.total_size | gauge | The total disk space used by the table, including indexes and TOAST data. |
postgresql.heap_blocks_read | gauge | The number of disk blocks read from this table. |
postgresql.heap_blocks_hit | gauge | The number of buffer hits in this table. |
postgresql.index_blocks_read | gauge | The number of disk blocks read from all indexes on this table. |
postgresql.index_blocks_hit | gauge | The number of buffer hits in all indexes on this table. |
postgresql.toast_blocks_read | gauge | The number of disk blocks read from this table’s TOAST table. |
postgresql.toast_blocks_hit | gauge | The number of buffer hits in this table’s TOAST table. |
postgresql.toast_index_blocks_read | gauge | The number of disk blocks read from this table’s TOAST table index. |
postgresql.toast_index_blocks_hit | gauge | The number of buffer hits in this table’s TOAST table index. |
postgresql.active_queries | gauge | The number of active queries in this database. |
postgresql.archiver.archived_count | gauge | The number of WAL files that have been successfully archived. |
postgresql.archiver.failed_count | gauge | The number of failed attempts for archiving WAL files. |
postgresql.before_xid_wraparound | gauge | The number of transactions that can occur until a transaction wraparound. |
postgresql.index_rel_rows_fetched | rate | The number of live rows fetched by index scans. |
postgresql.transactions.idle_in_transaction | gauge | The number of ‘idle in transaction’ transactions in this database. |
postgresql.transactions.open | gauge | The number of open transactions in this database. |
postgresql.waiting_queries | gauge | The number of waiting queries in this database. |
postgresql.waiting_queries | gauge | The number of buffers allocated |
postgresql.bgwriter.buffers_backend | gauge | The number of buffers written directly by a backend. |
postgresql.bgwriter.buffers_backend_fsync | gauge | The of times a backend had to execute its own fsync call instead of the background writer. |
postgresql.bgwriter.buffers_checkpoint | gauge | The number of buffers written during checkpoints. |
postgresql.bgwriter.buffers_clean | gauge | The number of buffers written by the background writer. |
postgresql.bgwriter.checkpoints_requested | gauge | The number of requested checkpoints that were performed. |
postgresql.bgwriter.checkpoints_timed | gauge | The number of scheduled checkpoints that were performed. |
postgresql.bgwriter.maxwritten_clean | gauge. | The number of times the background writer stopped a cleaning scan due to writing too many buffers. |
postgresql.bgwriter.sync_time | gauge | The total amount of checkpoint processing time spent synchronizing files to disk. |
postgresql.bgwriter.write_time | gauge | The total amount of checkpoint processing time spent writing files to disk. |
postgresql.buffer_hit | gauge | The number of times disk blocks were found in the buffer cache, preventing the need to read from the database. |
postgresql.commits | gauge | The number of transactions that have been committed in this database. |
postgresql.connections | gauge | The number of active connections to this database. |
postgresql.database_size | gauge | The disk space used by this database. |
postgresql.deadlocks | gauge | The number of deadlocks detected in this database |
postgresql.disk_read | gauge | The number of disk blocks read in this database. |
postgresql.locks | gauge | The number of locks active for this database. |
postgresql.max_connections | gauge | The maximum number of client connections allowed to this database. |
postgresql.percent_usage_connections | gauge | The number of connections to this database as a fraction of the maximum number of allowed connections. |
postgresql.replication_delay | gauge | The current replication delay in seconds. Only available with PostgreSQL 9.1 and newer. |
postgresql.replication_delay_bytes | gauge | The current replication delay in bytes. Only available with PostgreSQL 9.2 and newer. |
postgresql.rollbacks | gauge | The number of transactions that have been rolled back in this database. |
postgresql.rows_deleted | gauge | The number of rows deleted by queries in this database. |
postgresql.rows_fetched | gauge | The number of rows fetched by queries in this database. |
postgresql.rows_inserted | gauge | The number of rows inserted by queries in this database. The metrics can be segmented by ‘db’ or ’table’ and can be viewed per-relation. |
postgresql.rows_returned | gauge | The number of rows returned by queries in this database. The metrics can be segmented by ‘db’ or ’table’ and can be viewed per-relation. |
postgresql.rows_updated | gauge | The number of rows updated by queries in this database. |
postgresql.rows_deleted | gauge | The number of rows deleted by queries in this database. The metrics can be segmented by ‘db’ or ’table’ and can be viewed per-relation. |
postgresql.table.count | gauge | The number of user tables in this database. |
postgresql.temp_bytes | gauge | The amount of data written to temporary files by queries in this database. |
postgresql.temp_files | gauge | The number of temporary files created by queries in this database. |
postgresql.toast_blocks_read | gauge | The number of disk blocks read from this table’s TOAST table. |
postgresql.transactions.idle_in_transaction | gauge | The number of ‘idle in transaction’ transactions in this database. |
postgresql.transactions.open | gauge | The number of open transactions in this database. |
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.
Last modified June 23, 2022