PROMETHEUS-POSTGRES-EXPORTER(1)

πŸ’– PROMETHEUS-POSTGRES-EXPORTER πŸ’–

okay bestie, sit down, hydrate, because we're talking about prometheus-postgres-exporter β€” that's the prometheus-postgres-exporter(1) girlies, section 1 of your manual, the one you call when you need your PostgreSQL stats looking cute and Prometheus-shaped. she's an exporter. she takes Postgres metrics and hands them over. no cap. ✨


🌸 SYNOPSIS 🌸

prometheus-postgres-exporter [<flags>]

πŸ¦‹ DESCRIPTION πŸ¦‹

so the original page... leaves this one blank. literally nothing. iconic silence, honestly. but that's fine because everything you actually need lives down in OPTIONS, and she did not hold back there. let's go. πŸ‘‘


✨ OPTIONS ✨

  • -h, --help β€” shows you context-sensitive help πŸ’… and psst, you can also try --help-long and --help-man if you want the extended cut.

🧚 collectors 🧚

every single one of these turns a collector on or off, and the default is stated right there, so read carefully bestie. i've kept all of them exactly as she wrote them.

  • --collector.buffercache_summary β€” turns on the buffercache_summary collector (default: disabled).
  • --collector.database β€” turns on the database collector (default: enabled).
  • --collector.database_wraparound β€” turns on the database_wraparound collector (default: disabled).
  • --collector.locks β€” turns on the locks collector (default: enabled).
  • --collector.long_running_transactions β€” turns on the long_running_transactions collector (default: disabled).
  • --collector.postmaster β€” turns on the postmaster collector (default: disabled).
  • --collector.process_idle β€” turns on the process_idle collector (default: disabled).
  • --collector.replication β€” turns on the replication collector (default: enabled).
  • --collector.replication_slot β€” turns on the replication_slot collector (default: enabled).
  • --collector.roles β€” turns on the roles collector (default: enabled).
  • --collector.stat_activity_autovacuum β€” turns on the stat_activity_autovacuum collector (default: disabled).
  • --collector.stat_bgwriter β€” turns on the stat_bgwriter collector (default: enabled).
  • --collector.stat_checkpointer β€” turns on the stat_checkpointer collector (default: disabled).
  • --collector.stat_database β€” turns on the stat_database collector (default: enabled).
  • --collector.stat_progress_vacuum β€” turns on the stat_progress_vacuum collector (default: enabled).
  • --collector.stat_statements β€” turns on the stat_statements collector (default: disabled).
  • --collector.stat_statements.include_query β€” lets you select the statement query together with queryId (default: disabled).
  • --collector.stat_statements.query_length=120 β€” the max length of the statement text. one hundred and twenty, exactly as written.
  • --collector.stat_statements.limit=100 β€” the max number of statements to return.
  • --collector.stat_statements.exclude_databases β€” a comma-separated list of database names to exclude (default: none).
  • --collector.stat_statements.exclude_users β€” a comma-separated list of user names to exclude (default: none).
  • --collector.stat_user_tables β€” turns on the stat_user_tables collector (default: enabled).
  • --collector.stat_wal_receiver β€” turns on the stat_wal_receiver collector (default: disabled).
  • --collector.statio_user_indexes β€” turns on the statio_user_indexes collector (default: disabled).
  • --collector.statio_user_tables β€” turns on the statio_user_tables collector (default: enabled).
  • --collector.wal β€” turns on the wal collector (default: enabled).
  • --collector.xlog_location β€” turns on the xlog_location collector (default: disabled).

πŸŽ€ config + web stuff πŸŽ€

  • --config.file β€” the Postgres exporter configuration file. that's the one.
  • --web.systemd-socket β€” use systemd socket activation listeners instead of port listeners. Linux only, bestie, don't try it elsewhere.
  • --web.listen-address=:9187 β€” the addresses where the metrics and the web interface get exposed. it's repeatable so you can stack multiple addresses. examples she gave: :9100 or [::1]:9100 for http, and vsock://:9100 for vsock πŸ‘‘
  • --web.config.file β€” path to a configuration file that can enable TLS or authentication. see: https://github.com/prometheus/exporter-toolkit/blob/master/docs/web-configuration.md
  • --web.telemetry-path β€” the path under which to expose metrics.

πŸ“ turning things off + discovery πŸ“

  • --disable-default-metrics β€” do not include default metrics.
  • --disable-settings-metrics β€” do not include pg_settings metrics.
  • --auto-discover-databases β€” whether to discover the databases on a server dynamically. (DEPRECATED) ⚠️
  • --extend.query-path β€” path to custom queries to run. (DEPRECATED) ⚠️
  • --dumpmaps β€” don't run anything, just dump the maps. she said do not run. we listen. πŸ’€
  • --constantLabels β€” a list of label=value separated by comma(,). (DEPRECATED) ⚠️
  • --exclude-databases β€” a list of databases to remove when autoDiscoverDatabases is enabled (DEPRECATED) ⚠️
  • --include-databases β€” a list of databases to include when autoDiscoverDatabases is enabled (DEPRECATED) ⚠️
  • --metric-prefix β€” a metric prefix, for when you want non-default prefixes (so, anything that isn't "pg") on each of the metrics. yes, it's giving rebrand. πŸ’…
  • --collection-timeout β€” timeout for collecting the statistics when the database is slow. be patient with her.
  • --version β€” show the application version.

🌈 logging 🌈

  • --log.level=info β€” only log messages with the given severity or above. one of: [debug, info, warn, error]
  • --log.format=logfmt β€” output format of log messages. one of: [logfmt, json]

⚠️ heads up bestie: --auto-discover-databases, --extend.query-path, --constantLabels, --exclude-databases and --include-databases are all marked DEPRECATED. they still work, but she's side-eyeing them.
⚠️ --dumpmaps literally says do not run, simply dump the maps. do not run it expecting normal exporter behaviour. βœ‹

and that's the whole page, no skips, no shortcuts, every single flag accounted for 🫢 this was prometheus-postgres-exporter, version 0...., dated March 2026, and she ate. periodt. πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…

πŸ“¦ where this page comes from