Repository navigation
WARNING: upgrading with large counters can cause a one-time false rate spike.
Non-negative 64-bit counters are now wrapped at 2^53 by default so that
single-unit changes remain representable as float64. On the first scrape
after an upgrade, a previous value such as 2^53 + 1,234,567 becomes
1,234,567. Prometheus interprets that decrease as a counter reset and counts
the remainder as post-reset growth, so rate() and increase() can report a
large false spike for that evaluation window. Use
--no-wrap-large-counters to preserve the previous conversion during rollout;
enabling wrapping later will still create this one-time reset boundary.
DEPRECATION: the DATA_SOURCE_* environment variables that now have a flag.
Each one below keeps working and still takes effect when its flag is unset, but
the exporter logs a warning on startup and they will be removed in v0.22.0.
| Deprecated env var | Replacement |
|---|---|
DATA_SOURCE_URI |
--datasource.uri |
DATA_SOURCE_URI_FILE |
--datasource.uri-file |
DATA_SOURCE_USER_FILE |
--datasource.user-file |
DATA_SOURCE_PASS_FILE |
--datasource.pass-file |
DATA_SOURCE_NAME, DATA_SOURCE_USER and DATA_SOURCE_PASS are not
deprecated and get no flag: they carry secrets, and CLI flags are readable via
/proc and the Kubernetes API. Pass those by environment variable, or point
the -file flags at a mounted secret.
DEPRECATION: the PG_EXPORTER_* environment variables.
Each one below keeps working and still takes effect when its flag is unset, but
the exporter logs a warning on startup naming the flag to use instead. They
will be removed in v0.22.0.
| Deprecated env var | Replacement |
|---|---|
PG_EXPORTER_WEB_TELEMETRY_PATH |
--web.telemetry-path |
PG_EXPORTER_DISABLE_DEFAULT_METRICS |
--disable-default-metrics |
PG_EXPORTER_AUTO_DISCOVER_DATABASES |
--auto-discover-databases |
PG_EXPORTER_EXTEND_QUERY_PATH |
--extend.query-path |
PG_EXPORTER_CONSTANT_LABELS |
--constantLabels |
PG_EXPORTER_EXCLUDE_DATABASES |
--exclude-databases |
PG_EXPORTER_INCLUDE_DATABASES |
--include-databases |
PG_EXPORTER_METRIC_PREFIX |
--metric-prefix |
PG_EXPORTER_COLLECTION_TIMEOUT |
--collection-timeout |
- [CHANGE] Add
--datasource.*CLI flags for the Postgres connection config and deprecate theDATA_SOURCE_*environment variables they replace by @nicolastakashi in #1376 - [CHANGE] Wrap non-negative 64-bit counters at
2^53to preserve single-unit precision by @gnanirahulnutakki in #1351 - [CHANGE] Enforce concurrent scrape limits through
--web.max-requests(default40), independently for the metrics and/probeendpoints, by @ArthurSens in #1428. Previously, both endpoints allowed unlimited concurrent scrapes. After upgrading, requests exceeding the limit receive HTTP 503; multi-target deployments share one limit across all/probetargets, so setups that probe many targets can hit it. Set--web.max-requests=0to preserve the previous unlimited behavior. - [CHANGE] stat_replication: add
pidlabel to disambiguate replication connections that otherwise share identical labels by @sysadmind in #1353 - [CHANGE] stat_activity_autovacuum: add
datnameandschemanamelabels to disambiguate autovacuum workers that otherwise share arelnameby @spicysharkco in #1419 - [CHANGE] Deprecate
PG_EXPORTER_WEB_TELEMETRY_PATHfor removal in v0.22.0; use--web.telemetry-pathinstead, by @ArthurSens in #1428. Until removal, the environment variable continues to set the metrics path when the flag is unset and logs a startup warning. - [CHANGE] Deprecate the remaining
PG_EXPORTER_*environment variables for removal in v0.22.0 in favor of their flags, with a startup warning when one is used, by @adityareddy-dev in #1451 - [CHANGE] Drop all metrics from a collector that fails part way through a scrape, by @pujitha24 in #1401. Previously, the metrics collected before the error were still exposed. The failure is still reported by
pg_scrape_collector_success. - [CHANGE] Run the database-scoped collectors (
stat_user_tables,statio_user_tablesandstatio_user_indexes) against every configured database, and against every discovered database with--auto-discover-databases, by @mwimpelberg28 in #1378. Previously, they only ran against the first one. This can noticeably increase the number of series on multi-database setups.statio_user_indexesmetrics gain adatnamelabel. - [FEATURE] Add
--web.disable-exporter-metricsto exclude Go, process, andpostgres_exporter_build_infometrics while retaining PostgreSQL scrape-status and configuration-reload metrics, by @ArthurSens in #1428, based on @nicolastakashi's work in #1368. - [FEATURE] Export
pg_settings.pending_restartaspg_settings_pending_restart{name}from thesettingscollector by @MarcWort in #1396 - [FEATURE]
replication_slots: exportconflicting,inactive_since,failoverandsyncedfrompg_replication_slotson PostgreSQL 17+ by @abd-ulbasit in #1421 - [FEATURE] Reload the configuration file without restarting, through
POST /-/reloadorSIGHUP; if a reload fails, the last good configuration stays in use, by @Chaithanyanallamothu in #1406 - [FEATURE] Make the exporter embeddable as a Go library:
collector.Runtimeruns the collectors of one exporter instance and theconfigpackage holds its configuration, by @ArthurSens in #1330 - [FEATURE] Add
aurora_replica_statuscollector for Amazon Aurora PostgreSQL by @megative in #1311 - [FEATURE] Add
aurora_global_db_statuscollector for Amazon Aurora PostgreSQL by @megative in #1410 - [FEATURE] Add
aurora_stat_logical_wal_cachecollector for Amazon Aurora PostgreSQL by @megative in #1414 - [FEATURE] Add
aurora_stat_databasecollector for Amazon Aurora PostgreSQL by @megative in #1425 - [FEATURE] Add
aurora_global_db_instance_statuscollector for Amazon Aurora PostgreSQL by @megative in #1411 - [FEATURE] Add
aurora_stat_get_db_commit_latencycollector for Amazon Aurora PostgreSQL by @megative in #1413 - [FEATURE] Add
aurora_stat_dml_activitycollector for Amazon Aurora PostgreSQL by @megative in #1412 - [FEATURE] Add
aurora_stat_bgwritercollector for Amazon Aurora PostgreSQL by @megative in #1426 - [FEATURE] Add
aurora_stat_optimized_reads_cachecollector for Amazon Aurora PostgreSQL by @megative in #1427 - [FEATURE] Add
aurora_instancecollector for Amazon Aurora PostgreSQL by @megative in #1433 - [ENHANCEMENT] Allow running without a configuration file: an empty
--config.filedisables auth modules and avoids misleading startup warnings in single-target mode, by @ArthurSens in #1370 - [ENHANCEMENT] Update
github.com/lib/pqto v1.12.3, which adds support forsslmode=prefer,sslmode=allowandtarget_session_attrs, by @RajeshRajendiran in #1349 - [ENHANCEMENT] Include the
LICENSEandNOTICEfiles in the container image by @locker95 in #1380 - [BUGFIX] Add unit-correct
pg_database_wraparound_age_datfrozenxidandpg_database_wraparound_age_datminmxidgauges, by @je4yfc in #1417. The existing_secondsmetrics remain as deprecated aliases with unchanged ID-count values; migrate dashboards, rules, and alerts to the new names. - [BUGFIX] Fix
long_running_transactionsto count only transactions older than a configurable threshold, by @ArthurSens in #1379, based on the contribution by @moreinhardt in #1210 - [BUGFIX] Fix the
walcollector failing on every scrape on Amazon Aurora PostgreSQL versions that don't supportpg_ls_waldir()by @megative in #1312 - [BUGFIX] Fix the
replicationcollector failing on every scrape on Amazon Aurora PostgreSQL, where it now reports onlypg_replication_is_replica, by @megative in #1424, based on the contribution by @dannotripp in #1274 - [BUGFIX] Fix key=value DSNs that contain
=in a value: such a password is now redacted in logs, andoptions='-c statement_timeout=5000'now works for auto-discovered databases and/probetargets by @abd-ulbasit in #1423 - [BUGFIX] Redact passwords from logged connection errors: errors from the URL parser and the
lib/pqdriver quote the connection string and were logged as is, by @sysadmind in #1409 - [BUGFIX] Redact secrets passed as query string parameters, such as
?password=..., in logged DSNs by @sysadmind in #1389 - [BUGFIX] Apply
--collection-timeoutto the legacy exporter, including custom queries from--extend.query-path, so that slow queries no longer pile up across scrapes, by @maltere in #1393 - [BUGFIX]
stat_activity_autovacuum: skip autovacuum workers whosexact_startis NULL instead of failing the whole collector, by @locker95 in #1381 - [BUGFIX]
stat_database: report errors raised while reading query results instead of ignoring them, by @chieflibrarian in #1399