Categorygithub.com/rnaveiras/postgres_exporter
modulepackage
0.10.0
Repository: https://github.com/rnaveiras/postgres_exporter.git
Documentation: pkg.go.dev

# README

Postgres exporter

Prometheus exporter for PostgreSQL server metrics.

Collectors

  • disk_usage
  • stat_activity
  • stat_archiver
  • stat_bgwriter
  • stat_database
  • stat_progress_vacuum
  • stat_replication
  • stat_user_indexes
  • stat_user_tables
  • info
  • locks

Exported Metrics

MetricMeaningLabels
postgres_disk_usage_index_bytesNumber of bytes used on disk to store this indexdatname, schemaname, relname, indexname
postgres_disk_usage_table_bytesNumber of bytes used on disk to store this tabledatname, schemaname, relname
postgres_in_recoveryWhether Postgres is in recovery
postgres_infoPostgres versionversion
postgres_stat_activity_connectionsNumber of current connections in their current statedatname, state
postgres_stat_activity_oldest_backend_timestampOldest backend timestamp (epoch)
postgres_stat_activity_oldest_query_active_secondsOldest query in running state
postgres_stat_activity_oldest_snapshot_secondsOldest Snapshot
postgres_stat_activity_oldest_xact_secondsOldest transaction
postgres_stat_archiver_archived_totalNumber of WAL files that have been successfully archived
postgres_stat_archiver_failed_totalNumber of failed attempts for archiving WAL files
postgres_stat_archiver_stats_reset_timestampTime at which these statistics were last reset
postgres_stat_bgwriter_buffers_allow_totalNumber of buffers allocated
postgres_stat_bgwriter_buffers_backend_fsync_totalNumber of times a backend had to execute its own fsync call
postgres_stat_bgwriter_buffers_backend_totalNumber of buffers written directly by a backend
postgres_stat_bgwriter_buffers_checkpoint_totalNumber of buffers written during checkpoints
postgres_stat_bgwriter_buffers_clean_totalNumber of buffers written by the background writer
postgres_stat_bgwriter_checkpoint_sync_time_seconds_totalTotal amount of time that has been spent in the portion of checkpoint processing where files are synchronized to disk
postgres_stat_bgwriter_checkpoint_write_time_seconds_totalTotal amount of time that has been spent in the portion of checkpoint processing where files are written to disk
postgres_stat_bgwriter_checkpoints_req_totalNumber of requested checkpoints that have been performed
postgres_stat_bgwriter_checkpoints_timed_totalNumber of scheduled checkpoints that have been performed
postgres_stat_bgwriter_maxwritten_clean_totalNumber of times the background writter stopped a cleaning scan because it had written too many buffers
postgres_stat_bgwriter_stats_reset_timestampTime at wich these statistics were last reset
postgres_stat_database_blks_hit_totalNumber of times disk blocks were found already in the buffer cache, so that a read was not necessary (this only includes hits in the PostgreSQL buffer cache, not the operating system's file system cache)datname
postgres_stat_database_blks_read_totalNumber of disk blocks read in this databasedatname
postgres_stat_database_conflicts_totalNumber of queries canceled due to conflicts with recovery in this databasedatname
postgres_stat_database_deadlocks_totalNumber of deadlocks detected in this databasedatname
postgres_stat_database_numbackendsNumber of backends currently connected to this databasedatname
postgres_stat_database_temp_bytes_totalTotal amount of data written to temporary files by queries in this databasedatname
postgres_stat_database_temp_files_totalNumber of temporary files created by queries in this databasedatname
postgres_stat_database_tup_deleted_totalNumber of rows deleted by queries in this databasedatname
postgres_stat_database_tup_fetched_totalNumber of rows fetched by queries in this databasedatname
postgres_stat_database_tup_inserted_totalNumber of rows inserted by queries in this databasedatname
postgres_stat_database_tup_returned_totalNumber of rows returned by queries in this databasedatname
postgres_stat_database_tup_updated_totalNumber of rows updated by queries in this databasedatname
postgres_stat_database_xact_commit_totalNumber of transactions in this database that have been committeddatname
postgres_stat_database_xact_rollback_totalNumber of transactions in this database that have been rolled backdatname
postgres_stat_replication_lag_bytesReplication Lag in bytesapplication_name, client_addr, state, sync_state
postgres_stat_vacuum_progress_heap_blks_scannedNumber of heap blocks scannedpid, query_start, schemaname, datname, relname
postgres_stat_vacuum_progress_heap_blks_totalTotal number of heap blocks in the tablepid, query_start, schemaname, datname, relname
postgres_stat_vacuum_progress_heap_blks_vacuumedNumber of heap blocks vacuumedpid, query_start, schemaname, datname, relname
postgres_stat_vacuum_progress_index_vacuum_countNumber of completed index vacuum cyclespid, query_start, schemaname, datname, relname
postgres_stat_vacuum_progress_max_dead_tuplesNumber of dead tuples that we can store before needing to perform an index vacuum cyclepid, query_start, schemaname, datname, relname
postgres_stat_vacuum_progress_num_dead_tuplesNumber of dead tuples collected since the last index vacuum cyclepid, query_start, schemaname, datname, relname
postgres_stat_vacuum_progress_phase_cleaning_up_indexesVACUUM is currently cleaning up indexespid, query_start, schemaname, datname, relname
postgres_stat_vacuum_progress_phase_initializingVACUUM is preparing to begin scanning the heappid, query_start, schemaname, datname, relnam
postgres_stat_vacuum_progress_phase_performing_final_cleanupVACUUM is performing final cleanuppid, query_start, schemaname, datname, relname
postgres_stat_vacuum_progress_phase_scanning_heapVACUUM is currently scanning the heappid, query_start, schemaname, datname, relname
postgres_stat_vacuum_progress_phase_truncating_heapVACUUM is currently truncating the heappid, query_start, schemaname, datname, relname
postgres_stat_vacuum_progress_phase_vacuuming_heapVACUUM is currently vacuuming the heappid, query_start, schemaname, datname, relname
postgres_stat_vacuum_progress_phase_vacuuming_indexesVACUUM is currently vacuuming the indexespid, query_start, schemaname, datname, relname
postgres_stat_vacuum_progress_runningVACUUM is runningpid, query_start, schemaname, datname, relname
postgres_stat_user_indexes_scan_totalNumber of times this index has been scanneddatname, schemaname, tablename, indexname
postgres_stat_user_indexes_tuple_read_totalNumber of times tuples have been returned from scanning this indexdatname, schemaname, tablename, indexname
postgres_stat_user_indexes_tuple_fetch_totalNumber of live tuples fetched by scans on this indexdatname, schemaname, tablename, indexname
postgres_upWhether the Postgres server is up

Run

./postgres_exporter \
    --db.data-source="user=postgres host=/var/run/postgresql"

# Packages

No description provided by the author
No description provided by the author