Skip to content

Commit 8605d27

Browse files
SticksmanprombotsysadmindEric-Tyrrell22dswarbrick
authored and
GitHub Enterprise
committed
Update fork since September 23 (prometheus-community#27)
* Update common Prometheus files (prometheus-community#913) Signed-off-by: prombot <[email protected]> * Add changelog for v0.14 (prometheus-community#906) * Add changelog for v0.14 - Add changelog entries since v0.13.2 - Update README with new options - Bump version file Signed-off-by: Joe Adams <[email protected]> * Add changelog entry for prometheus-community#904 Signed-off-by: Joe Adams <[email protected]> --------- Signed-off-by: Joe Adams <[email protected]> * Adds 1kB and 2kB units (prometheus-community#915) Signed-off-by: Eric tyrrell <[email protected]> * Add error log when probe collector creation fails (prometheus-community#918) Signed-off-by: Joe Adams <[email protected]> * Fix test build failures on 32-bit arch again (prometheus-community#919) Another case of untyped integer overflows on 32-bit arch. Signed-off-by: Daniel Swarbrick <[email protected]> * Add 32-bit testing to CI (prometheus-community#920) Run Go tests with 32-bit to validate value overflow. Signed-off-by: SuperQ <[email protected]> * Bump github.com./prometheus/client_golang from 1.16.0 to 1.17.0 (prometheus-community#925) * Bump github.com./prometheus/client_golang from 1.16.0 to 1.17.0 Bumps [github.com./prometheus/client_golang](https://github.com./prometheus/client_golang) from 1.16.0 to 1.17.0. - [Release notes](https://github.com./prometheus/client_golang/releases) - [Changelog](https://github.com./prometheus/client_golang/blob/main/CHANGELOG.md) - [Commits](prometheus/client_golang@v1.16.0...v1.17.0) --- updated-dependencies: - dependency-name: github.com./prometheus/client_golang dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * Update tests for latest client_golang. Signed-off-by: SuperQ <[email protected]> --------- Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: SuperQ <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com.> Co-authored-by: SuperQ <[email protected]> * Update common Prometheus files (prometheus-community#926) Signed-off-by: prombot <[email protected]> * Adjust collector to use separate connection per scrape (prometheus-community#931) Fixes prometheus-community#921 Signed-off-by: Joe Adams <[email protected]> * Bump golang.org/x/net from 0.10.0 to 0.17.0 (prometheus-community#936) Bumps [golang.org/x/net](https://github.com./golang/net) from 0.10.0 to 0.17.0. - [Commits](golang/net@v0.10.0...v0.17.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com.> * Release v0.15.0 (prometheus-community#944) * [ENHANCEMENT] Add 1kB and 2kB units prometheus-community#915 * [BUGFIX] Add error log when probe collector creation fails prometheus-community#918 * [BUGFIX] Fix test build failures on 32-bit arch prometheus-community#919 * [BUGFIX] Adjust collector to use separate connection per scrape prometheus-community#936 Signed-off-by: SuperQ <[email protected]> * Update common Prometheus files (prometheus-community#951) Signed-off-by: prombot <[email protected]> * Update common Prometheus files (prometheus-community#963) Signed-off-by: prombot <[email protected]> * pg_replication_slot: add slot type label (prometheus-community#960) Signed-off-by: Alex Simenduev <[email protected]> * Bump github.com./prometheus/common from 0.44.0 to 0.45.0 (prometheus-community#948) Bumps [github.com./prometheus/common](https://github.com./prometheus/common) from 0.44.0 to 0.45.0. - [Release notes](https://github.com./prometheus/common/releases) - [Commits](prometheus/common@v0.44.0...v0.45.0) --- updated-dependencies: - dependency-name: github.com./prometheus/common dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com.> * Bump github.com./prometheus/client_model (prometheus-community#949) Bumps [github.com./prometheus/client_model](https://github.com./prometheus/client_model) from 0.4.1-0.20230718164431-9a2bf3000d16 to 0.5.0. - [Release notes](https://github.com./prometheus/client_model/releases) - [Commits](https://github.com./prometheus/client_model/commits/v0.5.0) --- updated-dependencies: - dependency-name: github.com./prometheus/client_model dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com.> * pg_stat_database: added support for `active_time` counter (prometheus-community#961) * feat(pg_stat_database): active time metric --------- Signed-off-by: Jiri Sveceny <[email protected]> * Bump golang.org/x/crypto from 0.14.0 to 0.17.0 (prometheus-community#988) Bumps [golang.org/x/crypto](https://github.com./golang/crypto) from 0.14.0 to 0.17.0. - [Commits](golang/crypto@v0.14.0...v0.17.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com.> * Bump github.com./prometheus/client_golang from 1.17.0 to 1.18.0 (prometheus-community#993) Bumps [github.com./prometheus/client_golang](https://github.com./prometheus/client_golang) from 1.17.0 to 1.18.0. - [Release notes](https://github.com./prometheus/client_golang/releases) - [Changelog](https://github.com./prometheus/client_golang/blob/main/CHANGELOG.md) - [Commits](prometheus/client_golang@v1.17.0...v1.18.0) --- updated-dependencies: - dependency-name: github.com./prometheus/client_golang dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com.> * use Info level for excluded databases log message (prometheus-community#1003) This is the only log message which didn't specify a level in the postgres_exporter. I am unsure if this log message should be info or debug, but leaning towards the more important since previously it would just always log. The way I validated this was the only non-leveled logger was via grep. Both of these only returned this callsite previously: git grep 'logger\.Log' git grep '\.Log(' | grep -v level Signed-off-by: Keegan Carruthers-Smith <[email protected]> * Add connection limits metrics for pg_roles and pg_database (prometheus-community#997) * Add database connection limits metrics Signed-off-by: Jocelyn Thode <[email protected]> * Add roles connection limits metrics Signed-off-by: Jocelyn Thode <[email protected]> * Fix copyright year Co-authored-by: Joe Adams <[email protected]> Signed-off-by: Jocelyn Thode <[email protected]> * Fix spacing in pgDatabaseQuery Co-authored-by: Joe Adams <[email protected]> Signed-off-by: Jocelyn Thode <[email protected]> * Fix case on pgRolesConnectionLimitsQuery Co-authored-by: Joe Adams <[email protected]> Signed-off-by: Jocelyn Thode <[email protected]> * Do not add roleMetrics when row is not valid Signed-off-by: Jocelyn Thode <[email protected]> --------- Signed-off-by: Jocelyn Thode <[email protected]> Signed-off-by: Jocelyn Thode <[email protected]> Co-authored-by: Joe Adams <[email protected]> * Bump github.com./DATA-DOG/go-sqlmock from 1.5.0 to 1.5.2 (prometheus-community#1000) Bumps [github.com./DATA-DOG/go-sqlmock](https://github.com./DATA-DOG/go-sqlmock) from 1.5.0 to 1.5.2. - [Release notes](https://github.com./DATA-DOG/go-sqlmock/releases) - [Commits](DATA-DOG/go-sqlmock@v1.5.0...v1.5.2) --- updated-dependencies: - dependency-name: github.com./DATA-DOG/go-sqlmock dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com.> * Bump github.com./prometheus/client_golang from 1.18.0 to 1.19.0 (prometheus-community#1011) Bumps [github.com./prometheus/client_golang](https://github.com./prometheus/client_golang) from 1.18.0 to 1.19.0. - [Release notes](https://github.com./prometheus/client_golang/releases) - [Changelog](https://github.com./prometheus/client_golang/blob/v1.19.0/CHANGELOG.md) - [Commits](prometheus/client_golang@v1.18.0...v1.19.0) --- updated-dependencies: - dependency-name: github.com./prometheus/client_golang dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com.> * Bump github.com./prometheus/client_model from 0.5.0 to 0.6.0 (prometheus-community#1010) Bumps [github.com./prometheus/client_model](https://github.com./prometheus/client_model) from 0.5.0 to 0.6.0. - [Release notes](https://github.com./prometheus/client_model/releases) - [Commits](prometheus/client_model@v0.5.0...v0.6.0) --- updated-dependencies: - dependency-name: github.com./prometheus/client_model dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com.> * Bump google.golang.org/protobuf from 1.32.0 to 1.33.0 (prometheus-community#1014) Bumps google.golang.org/protobuf from 1.32.0 to 1.33.0. --- updated-dependencies: - dependency-name: google.golang.org/protobuf dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com.> * Bump github.com./prometheus/exporter-toolkit from 0.10.0 to 0.11.0 (prometheus-community#992) Bumps [github.com./prometheus/exporter-toolkit](https://github.com./prometheus/exporter-toolkit) from 0.10.0 to 0.11.0. - [Release notes](https://github.com./prometheus/exporter-toolkit/releases) - [Changelog](https://github.com./prometheus/exporter-toolkit/blob/master/CHANGELOG.md) - [Commits](prometheus/exporter-toolkit@v0.10.0...v0.11.0) --- updated-dependencies: - dependency-name: github.com./prometheus/exporter-toolkit dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com.> * Bump golang.org/x/net from 0.20.0 to 0.23.0 (prometheus-community#1021) Bumps [golang.org/x/net](https://github.com./golang/net) from 0.20.0 to 0.23.0. - [Commits](golang/net@v0.20.0...v0.23.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com.> * feat: Add safe_wal_size and wal_status to replication_slot (prometheus-community#1027) * feat: Add safe_wal_size to replication_slot Signed-off-by: MarcWort <[email protected]> * feat: Add wal_status to replication_slot Signed-off-by: MarcWort <[email protected]> --------- Signed-off-by: MarcWort <[email protected]> * fix: Only query active_time on pg>=14 (prometheus-community#1045) Signed-off-by: MarcWort <[email protected]> * Update README.md (prometheus-community#1038) Better example for the quick start with prometheus config and avoiding deprecated env variables. Signed-off-by: fhackenberger <[email protected]> * stop logging errors on replicas, fixes prometheus-community#547 (prometheus-community#1048) Signed-off-by: Steffen Zieger <[email protected]> * Update common Prometheus files (prometheus-community#983) Signed-off-by: prombot <[email protected]> * Update common Prometheus files (prometheus-community#1076) Signed-off-by: prombot <[email protected]> * chore!: adopt log/slog, drop go-kit/log (prometheus-community#1073) * ci: update go to version 1.23 Signed-off-by: TJ Hoplock <[email protected]> * build(deps): bump prometheus/{client_golang,common,exporter-toolkit} Signed-off-by: TJ Hoplock <[email protected]> * chore!: adopt log/slog, drop go-kit/log The bulk of this change set was automated by the following script which is being used to aid in converting the various exporters/projects to use slog: https://gist.github.com./tjhop/49f96fb7ebbe55b12deee0b0312d8434 Signed-off-by: TJ Hoplock <[email protected]> --------- Signed-off-by: TJ Hoplock <[email protected]> Co-authored-by: Ben Kochie <[email protected]> * Bump github.com./prometheus/client_golang from 1.20.4 to 1.20.5 (prometheus-community#1079) Bumps [github.com./prometheus/client_golang](https://github.com./prometheus/client_golang) from 1.20.4 to 1.20.5. - [Release notes](https://github.com./prometheus/client_golang/releases) - [Changelog](https://github.com./prometheus/client_golang/blob/main/CHANGELOG.md) - [Commits](prometheus/client_golang@v1.20.4...v1.20.5) --- updated-dependencies: - dependency-name: github.com./prometheus/client_golang dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com.> * Bump github.com./prometheus/common from 0.60.0 to 0.60.1 (prometheus-community#1080) Bumps [github.com./prometheus/common](https://github.com./prometheus/common) from 0.60.0 to 0.60.1. - [Release notes](https://github.com./prometheus/common/releases) - [Changelog](https://github.com./prometheus/common/blob/main/RELEASE.md) - [Commits](prometheus/common@v0.60.0...v0.60.1) --- updated-dependencies: - dependency-name: github.com./prometheus/common dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com.> * Make walreceiver collector useful w/o repmgr (prometheus-community#1086) In a streaming replication setup that was created without replication manager (`repmgr`), the `stat_wal_receiver` collector does not return any metrics, because one value it wants to export is not present. This is rather overly opinionated. The missing metric is comparatively uninteresting and does not justify discarding all the others. And replication setups created without `repmgr` are not exactly rare. This commit makes the one relevant metric optional and simply skips it if the respective value cannot be determined. Signed-off-by: Conrad Hoffmann <[email protected]> * Update common Prometheus files (prometheus-community#1083) Signed-off-by: prombot <[email protected]> * Bump github.com./prometheus/exporter-toolkit from 0.13.0 to 0.13.1 (prometheus-community#1081) Bumps [github.com./prometheus/exporter-toolkit](https://github.com./prometheus/exporter-toolkit) from 0.13.0 to 0.13.1. - [Release notes](https://github.com./prometheus/exporter-toolkit/releases) - [Changelog](https://github.com./prometheus/exporter-toolkit/blob/master/CHANGELOG.md) - [Commits](prometheus/exporter-toolkit@v0.13.0...v0.13.1) --- updated-dependencies: - dependency-name: github.com./prometheus/exporter-toolkit dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com.> * Update common Prometheus files (prometheus-community#1087) Signed-off-by: prombot <[email protected]> * Update changelog and version for a v0.16.0 release (prometheus-community#1088) Signed-off-by: Joe Adams <[email protected]> * Fix version header in changelog (prometheus-community#1089) Signed-off-by: Joe Adams <[email protected]> * Update pg_long_running_transactions.go (prometheus-community#1092) To extract time in seconds for pg_long_running_transactions_oldest_timestamp_seconds query which currently return epoch time. Signed-off-by: Jyothi Kiran Thammana <[email protected]> * Fix to replace dashes with underscore in the metric names (prometheus-community#1103) * Fix to replace dashes with underscore in the metric names Signed-off-by: aagarwalla-fx <[email protected]> * Code style fix Signed-off-by: aagarwalla-fx <[email protected]> --------- Signed-off-by: aagarwalla-fx <[email protected]> * Bump github.com./prometheus/exporter-toolkit from 0.13.1 to 0.13.2 (prometheus-community#1108) Bumps [github.com./prometheus/exporter-toolkit](https://github.com./prometheus/exporter-toolkit) from 0.13.1 to 0.13.2. - [Release notes](https://github.com./prometheus/exporter-toolkit/releases) - [Changelog](https://github.com./prometheus/exporter-toolkit/blob/master/CHANGELOG.md) - [Commits](prometheus/exporter-toolkit@v0.13.1...v0.13.2) --- updated-dependencies: - dependency-name: github.com./prometheus/exporter-toolkit dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com.> * Checkpoint related columns in PG 17 have been moved from pg_stat_bgwriter to pg_stat_checkpointer (prometheus-community#1072) * Checkpoint related columns in PG 17 have been moved from pg_stat_bgwriter to pg_stat_checkpointer Fix prometheus-community#1060 See: https://www.dbi-services.com/blog/postgresql-17-new-catalog-view-pg_stat_checkpointer/ Signed-off-by: Nicolas Rodriguez <[email protected]> * Add support for pg_stat_checkpointer See: https://www.dbi-services.com/blog/postgresql-17-new-catalog-view-pg_stat_checkpointer/ Signed-off-by: Nicolas Rodriguez <[email protected]> * Run integration tests with Postgres 17 Signed-off-by: Nicolas Rodriguez <[email protected]> * Update date in file header Signed-off-by: Nicolas Rodriguez <[email protected]> --------- Signed-off-by: Nicolas Rodriguez <[email protected]> * Update common Prometheus files (prometheus-community#1090) Signed-off-by: prombot <[email protected]> * Update common Prometheus files (prometheus-community#1110) Signed-off-by: prombot <[email protected]> * Add Postgres 17 for CI test (prometheus-community#1105) Signed-off-by: Khiem Doan <[email protected]> * Bump github.com./prometheus/common from 0.61.0 to 0.62.0 (prometheus-community#1118) Bumps [github.com./prometheus/common](https://github.com./prometheus/common) from 0.61.0 to 0.62.0. - [Release notes](https://github.com./prometheus/common/releases) - [Changelog](https://github.com./prometheus/common/blob/main/RELEASE.md) - [Commits](prometheus/common@v0.61.0...v0.62.0) --- updated-dependencies: - dependency-name: github.com./prometheus/common dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com.> * Update common Prometheus files (prometheus-community#1124) Signed-off-by: prombot <[email protected]> * pg_stat_statements PG17 (prometheus-community#1114) Signed-off-by: Nevermind <[email protected]> * fix: handle pg_replication_slots on pg<13 (prometheus-community#1098) * fix: handle pg_replication_slots on pg<13 Signed-off-by: Michael Todorovic <[email protected]> * fix: tests Signed-off-by: Michael Todorovic <[email protected]> --------- Signed-off-by: Michael Todorovic <[email protected]> * feat: add wait/backend to pg_stat_activity (prometheus-community#1106) Signed-off-by: Felipe Galindo Sanchez <[email protected]> * Export last replay age in replication collector (prometheus-community#1085) The exported replication lag does not handle all failure modes, and can report 0 for replicas that are out of sync and incapable of recovery. A proper replacement for that metric would require a different approach (see e.g. prometheus-community#1007), but for a lot of folks, simply exporting the age of the last replay can provide a pretty strong signal for something being amiss. I think this solution might be preferable to prometheus-community#977, though the lag metric needs to be fixed or abandoned eventually. Signed-off-by: Conrad Hoffmann <[email protected]> * Bump github.com./prometheus/exporter-toolkit from 0.13.2 to 0.14.0 (prometheus-community#1126) Bumps [github.com./prometheus/exporter-toolkit](https://github.com./prometheus/exporter-toolkit) from 0.13.2 to 0.14.0. - [Release notes](https://github.com./prometheus/exporter-toolkit/releases) - [Changelog](https://github.com./prometheus/exporter-toolkit/blob/master/CHANGELOG.md) - [Commits](prometheus/exporter-toolkit@v0.13.2...v0.14.0) --- updated-dependencies: - dependency-name: github.com./prometheus/exporter-toolkit dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com.> * Fix missing dsn sanitization for logging (prometheus-community#1104) This log line was not sanitized previously which could result in logging sensitive information. I have scanned the rest of the files and I don't see anywhere else that DSN is used in a log line without this filter. Resolves prometheus-community#1042 Signed-off-by: Joe Adams <[email protected]> * Skip pg_stat_checkpointer collector if pg<17 (prometheus-community#1112) * fix: skip collector if pg<17 Signed-off-by: Michael Todorovic <[email protected]> * fix: better condition Signed-off-by: Michael Todorovic <[email protected]> * fix: fix PGStatCheckpointerCollector tests Signed-off-by: Nicolas Rodriguez <[email protected]> --------- Signed-off-by: Michael Todorovic <[email protected]> Signed-off-by: Nicolas Rodriguez <[email protected]> Co-authored-by: Michael Todorovic <[email protected]> * Prep for v0.17 (prometheus-community#1127) Signed-off-by: Joe Adams <[email protected]> * Fix: Handle incoming labels with invalid UTF-8 (prometheus-community#1131) It's possible that incoming labels will contain invalid UTF-8 characters. This results in a panic. This fix sanitizes the label's string to ensure only valid UTF-8 characters are included, by replacing invalid characters with � (REPLACEMENT CHARACTER) Signed-off-by: Cooper Worobetz <[email protected]> * Release v0.17.1 (prometheus-community#1132) * [BUGFIX] Fix: Handle incoming labels with invalid UTF-8 prometheus-community#1131 Signed-off-by: SuperQ <[email protected]> * Bump github.com./prometheus/client_golang from 1.20.5 to 1.21.0 (prometheus-community#1133) Bumps [github.com./prometheus/client_golang](https://github.com./prometheus/client_golang) from 1.20.5 to 1.21.0. - [Release notes](https://github.com./prometheus/client_golang/releases) - [Changelog](https://github.com./prometheus/client_golang/blob/main/CHANGELOG.md) - [Commits](prometheus/client_golang@v1.20.5...v1.21.0) --- updated-dependencies: - dependency-name: github.com./prometheus/client_golang dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com.> * Update common Prometheus files (prometheus-community#1137) Signed-off-by: prombot <[email protected]> * Bump golang.org/x/net from 0.33.0 to 0.36.0 (prometheus-community#1138) Bumps [golang.org/x/net](https://github.com./golang/net) from 0.33.0 to 0.36.0. - [Commits](golang/net@v0.33.0...v0.36.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com.> * Update common Prometheus files (prometheus-community#1140) Signed-off-by: prombot <[email protected]> * Update common Prometheus files (prometheus-community#1142) Signed-off-by: prombot <[email protected]> * Adds pg_stat_progress_vacuum collector (prometheus-community#1141) Signed-off-by: Ian Bibby <[email protected]> Co-authored-by: Ben Kochie <[email protected]> * Update Go (prometheus-community#1147) * Update Go to 1.24. * Update golangci-lint to v2. * Fixup linting issues. Signed-off-by: SuperQ <[email protected]> * Bump github.com./prometheus/client_golang from 1.21.0 to 1.21.1 (prometheus-community#1144) Bumps [github.com./prometheus/client_golang](https://github.com./prometheus/client_golang) from 1.21.0 to 1.21.1. - [Release notes](https://github.com./prometheus/client_golang/releases) - [Changelog](https://github.com./prometheus/client_golang/blob/main/CHANGELOG.md) - [Commits](prometheus/client_golang@v1.21.0...v1.21.1) --- updated-dependencies: - dependency-name: github.com./prometheus/client_golang dependency-version: 1.21.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com.> * Bump github.com./prometheus/common from 0.62.0 to 0.63.0 (prometheus-community#1143) Bumps [github.com./prometheus/common](https://github.com./prometheus/common) from 0.62.0 to 0.63.0. - [Release notes](https://github.com./prometheus/common/releases) - [Changelog](https://github.com./prometheus/common/blob/main/RELEASE.md) - [Commits](prometheus/common@v0.62.0...v0.63.0) --- updated-dependencies: - dependency-name: github.com./prometheus/common dependency-version: 0.63.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com.> * Record table only size bytes as well in addition to the total size bytes (prometheus-community#1149) * Record table only size bytes as well in addition to the total size bytes Signed-off-by: Felix Yuan <[email protected]> * Update collector/pg_stat_user_tables.go Co-authored-by: Ben Kochie <[email protected]> Signed-off-by: Felix Yuan <[email protected]> * Update collector/pg_stat_user_tables.go Co-authored-by: Ben Kochie <[email protected]> Signed-off-by: Felix Yuan <[email protected]> * Finish renaming elements to index and table size Signed-off-by: Felix Yuan <[email protected]> --------- Signed-off-by: Felix Yuan <[email protected]> Co-authored-by: Ben Kochie <[email protected]> * Bump golang.org/x/net from 0.36.0 to 0.38.0 (prometheus-community#1152) Bumps [golang.org/x/net](https://github.com./golang/net) from 0.36.0 to 0.38.0. - [Commits](golang/net@v0.36.0...v0.38.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-version: 0.38.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com.> --------- Signed-off-by: prombot <[email protected]> Signed-off-by: Joe Adams <[email protected]> Signed-off-by: Eric tyrrell <[email protected]> Signed-off-by: Daniel Swarbrick <[email protected]> Signed-off-by: SuperQ <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: Alex Simenduev <[email protected]> Signed-off-by: Jiri Sveceny <[email protected]> Signed-off-by: Keegan Carruthers-Smith <[email protected]> Signed-off-by: Jocelyn Thode <[email protected]> Signed-off-by: Jocelyn Thode <[email protected]> Signed-off-by: MarcWort <[email protected]> Signed-off-by: fhackenberger <[email protected]> Signed-off-by: Steffen Zieger <[email protected]> Signed-off-by: TJ Hoplock <[email protected]> Signed-off-by: Conrad Hoffmann <[email protected]> Signed-off-by: Jyothi Kiran Thammana <[email protected]> Signed-off-by: aagarwalla-fx <[email protected]> Signed-off-by: Nicolas Rodriguez <[email protected]> Signed-off-by: Khiem Doan <[email protected]> Signed-off-by: Nevermind <[email protected]> Signed-off-by: Michael Todorovic <[email protected]> Signed-off-by: Felipe Galindo Sanchez <[email protected]> Signed-off-by: Cooper Worobetz <[email protected]> Signed-off-by: Ian Bibby <[email protected]> Signed-off-by: Felix Yuan <[email protected]> Co-authored-by: PrometheusBot <[email protected]> Co-authored-by: Joe Adams <[email protected]> Co-authored-by: Eric Tyrrell <[email protected]> Co-authored-by: Daniel Swarbrick <[email protected]> Co-authored-by: Ben Kochie <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com.> Co-authored-by: Alex Simenduev <[email protected]> Co-authored-by: Jiri Sveceny <[email protected]> Co-authored-by: Keegan Carruthers-Smith <[email protected]> Co-authored-by: Jocelyn Thode <[email protected]> Co-authored-by: Marc W <[email protected]> Co-authored-by: fhackenberger <[email protected]> Co-authored-by: Steffen Zieger <[email protected]> Co-authored-by: TJ Hoplock <[email protected]> Co-authored-by: Conrad Hoffmann <[email protected]> Co-authored-by: Jyothi Kiran Thammana <[email protected]> Co-authored-by: aagarwalla-fx <[email protected]> Co-authored-by: Nicolas Rodriguez <[email protected]> Co-authored-by: Khiem Doan <[email protected]> Co-authored-by: Nevermind <[email protected]> Co-authored-by: Michael Todorovic <[email protected]> Co-authored-by: Felipe Galindo Sanchez <[email protected]> Co-authored-by: vancwo <[email protected]> Co-authored-by: Ian Bibby <[email protected]>
1 parent 2e766a7 commit 8605d27

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+1988
-565
lines changed

.circleci/config.yml

+7-5
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,22 @@ executors:
88
# This must match .promu.yml.
99
golang:
1010
docker:
11-
- image: cimg/go:1.20
11+
- image: cimg/go:1.24
1212

1313
jobs:
1414
test:
1515
executor: golang
1616

1717
steps:
1818
- prometheus/setup_environment
19+
- run: GOHOSTARCH=386 GOARCH=386 make test
1920
- run: make
2021
- prometheus/store_artifact:
2122
file: postgres_exporter
2223

2324
integration:
2425
docker:
25-
- image: cimg/go:1.20
26+
- image: cimg/go:1.24
2627
- image: << parameters.postgres_image >>
2728
environment:
2829
POSTGRES_DB: circle_test
@@ -56,12 +57,13 @@ workflows:
5657
matrix:
5758
parameters:
5859
postgres_image:
59-
- circleci/postgres:10
6060
- circleci/postgres:11
6161
- circleci/postgres:12
6262
- circleci/postgres:13
63-
- cimg/postgres:14.1
64-
- cimg/postgres:15.1
63+
- cimg/postgres:14.9
64+
- cimg/postgres:15.4
65+
- cimg/postgres:16.0
66+
- cimg/postgres:17.0
6567
- prometheus/build:
6668
name: build
6769
parallelism: 3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
name: Push README to Docker Hub
3+
on:
4+
push:
5+
paths:
6+
- "README.md"
7+
- "README-containers.md"
8+
- ".github/workflows/container_description.yml"
9+
branches: [ main, master ]
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
PushDockerHubReadme:
16+
runs-on: ubuntu-latest
17+
name: Push README to Docker Hub
18+
if: github.repository_owner == 'prometheus' || github.repository_owner == 'prometheus-community' # Don't run this workflow on forks.
19+
steps:
20+
- name: git checkout
21+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
22+
- name: Set docker hub repo name
23+
run: echo "DOCKER_REPO_NAME=$(make docker-repo-name)" >> $GITHUB_ENV
24+
- name: Push README to Dockerhub
25+
uses: christian-korneck/update-container-description-action@d36005551adeaba9698d8d67a296bd16fa91f8e8 # v1
26+
env:
27+
DOCKER_USER: ${{ secrets.DOCKER_HUB_LOGIN }}
28+
DOCKER_PASS: ${{ secrets.DOCKER_HUB_PASSWORD }}
29+
with:
30+
destination_container_repo: ${{ env.DOCKER_REPO_NAME }}
31+
provider: dockerhub
32+
short_description: ${{ env.DOCKER_REPO_NAME }}
33+
# Empty string results in README-containers.md being pushed if it
34+
# exists. Otherwise, README.md is pushed.
35+
readme_file: ''
36+
37+
PushQuayIoReadme:
38+
runs-on: ubuntu-latest
39+
name: Push README to quay.io
40+
if: github.repository_owner == 'prometheus' || github.repository_owner == 'prometheus-community' # Don't run this workflow on forks.
41+
steps:
42+
- name: git checkout
43+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
44+
- name: Set quay.io org name
45+
run: echo "DOCKER_REPO=$(echo quay.io/${GITHUB_REPOSITORY_OWNER} | tr -d '-')" >> $GITHUB_ENV
46+
- name: Set quay.io repo name
47+
run: echo "DOCKER_REPO_NAME=$(make docker-repo-name)" >> $GITHUB_ENV
48+
- name: Push README to quay.io
49+
uses: christian-korneck/update-container-description-action@d36005551adeaba9698d8d67a296bd16fa91f8e8 # v1
50+
env:
51+
DOCKER_APIKEY: ${{ secrets.QUAY_IO_API_TOKEN }}
52+
with:
53+
destination_container_repo: ${{ env.DOCKER_REPO_NAME }}
54+
provider: quay
55+
# Empty string results in README-containers.md being pushed if it
56+
# exists. Otherwise, README.md is pushed.
57+
readme_file: ''

.github/workflows/golangci-lint.yml

+13-6
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,28 @@ on:
1212
- ".golangci.yml"
1313
pull_request:
1414

15+
permissions: # added using https://github.com./step-security/secure-repo
16+
contents: read
17+
1518
jobs:
1619
golangci:
20+
permissions:
21+
contents: read # for actions/checkout to fetch code
22+
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
1723
name: lint
1824
runs-on: ubuntu-latest
1925
steps:
2026
- name: Checkout repository
21-
uses: actions/checkout@v3
22-
- name: install Go
23-
uses: actions/setup-go@v3
27+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
28+
- name: Install Go
29+
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
2430
with:
25-
go-version: 1.20.x
31+
go-version: 1.24.x
2632
- name: Install snmp_exporter/generator dependencies
2733
run: sudo apt-get update && sudo apt-get -y install libsnmp-dev
2834
if: github.repository == 'prometheus/snmp_exporter'
2935
- name: Lint
30-
uses: golangci/golangci-lint-action@v3.4.0
36+
uses: golangci/golangci-lint-action@1481404843c368bc19ca9406f87d6e0fc97bdcfd # v7.0.0
3137
with:
32-
version: v1.54.2
38+
args: --verbose
39+
version: v2.0.2

.golangci.yml

+33-20
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,36 @@
1-
---
1+
version: "2"
22
linters:
33
enable:
4-
- misspell
5-
- revive
6-
7-
issues:
8-
exclude-rules:
9-
- path: _test.go
10-
linters:
11-
- errcheck
12-
13-
linters-settings:
14-
errcheck:
15-
exclude-functions:
16-
# Never check for logger errors.
17-
- (github.com./go-kit/log.Logger).Log
18-
revive:
4+
- misspell
5+
- revive
6+
settings:
7+
errcheck:
8+
exclude-functions:
9+
- (github.com./go-kit/log.Logger).Log
10+
revive:
11+
rules:
12+
- name: unused-parameter
13+
severity: warning
14+
disabled: true
15+
exclusions:
16+
generated: lax
17+
presets:
18+
- comments
19+
- common-false-positives
20+
- legacy
21+
- std-error-handling
1922
rules:
20-
# https://github.com./mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unused-parameter
21-
- name: unused-parameter
22-
severity: warning
23-
disabled: true
23+
- linters:
24+
- errcheck
25+
path: _test.go
26+
paths:
27+
- third_party$
28+
- builtin$
29+
- examples$
30+
formatters:
31+
exclusions:
32+
generated: lax
33+
paths:
34+
- third_party$
35+
- builtin$
36+
- examples$

.promu.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
go:
22
# This must match .circle/config.yml.
3-
version: 1.20
3+
version: 1.24
44
repository:
55
path: github.com./prometheus-community/postgres_exporter
66
build:
77
binaries:
88
- name: postgres_exporter
99
path: ./cmd/postgres_exporter
10-
flags: -a -tags 'netgo static_build'
1110
ldflags: |
1211
-X github.com./prometheus/common/version.Version={{.Version}}
1312
-X github.com./prometheus/common/version.Revision={{.Revision}}

.yamllint

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
22
extends: default
3+
ignore: |
4+
**/node_modules
35

46
rules:
57
braces:

CHANGELOG.md

+66
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,69 @@
1+
## 0.17.1 / 2025-02-26
2+
3+
* [BUGFIX] Fix: Handle incoming labels with invalid UTF-8 #1131
4+
5+
## 0.17.0 / 2025-02-16
6+
7+
## What's Changed
8+
* [ENHANCEMENT] Add Postgres 17 for CI test by @khiemdoan in https://github.com./prometheus-community/postgres_exporter/pull/1105
9+
* [ENHANCEMENT] Add wait/backend to pg_stat_activity by @fgalind1 in https://github.com./prometheus-community/postgres_exporter/pull/1106
10+
* [ENHANCEMENT] Export last replay age in replication collector by @bitfehler in https://github.com./prometheus-community/postgres_exporter/pull/1085
11+
* [BUGFIX] Fix pg_long_running_transactions time by @jyothikirant-sayukth in https://github.com./prometheus-community/postgres_exporter/pull/1092
12+
* [BUGFIX] Fix to replace dashes with underscore in the metric names by @aagarwalla-fx in https://github.com./prometheus-community/postgres_exporter/pull/1103
13+
* [BIGFIX] Checkpoint related columns in PG 17 have been moved from pg_stat_bgwriter to pg_stat_checkpointer by @n-rodriguez in https://github.com./prometheus-community/postgres_exporter/pull/1072
14+
* [BUGFIX] Fix pg_stat_statements for PG17 by @NevermindZ4 in https://github.com./prometheus-community/postgres_exporter/pull/1114
15+
* [BUGFIX] Handle pg_replication_slots on pg<13 by @michael-todorovic in https://github.com./prometheus-community/postgres_exporter/pull/1098
16+
* [BUGFIX] Fix missing dsn sanitization for logging by @sysadmind in https://github.com./prometheus-community/postgres_exporter/pull/1104
17+
18+
## New Contributors
19+
* @jyothikirant-sayukth made their first contribution in https://github.com./prometheus-community/postgres_exporter/pull/1092
20+
* @aagarwalla-fx made their first contribution in https://github.com./prometheus-community/postgres_exporter/pull/1103
21+
* @NevermindZ4 made their first contribution in https://github.com./prometheus-community/postgres_exporter/pull/1114
22+
* @michael-todorovic made their first contribution in https://github.com./prometheus-community/postgres_exporter/pull/1098
23+
* @fgalind1 made their first contribution in https://github.com./prometheus-community/postgres_exporter/pull/1106
24+
25+
**Full Changelog**: https://github.com./prometheus-community/postgres_exporter/compare/v0.16.0...v0.17.0
26+
27+
## 0.16.0 / 2024-11-10
28+
29+
BREAKING CHANGES:
30+
31+
The logging system has been replaced with log/slog from the stdlib. This change is being made across the prometheus ecosystem. The logging output has changed, but the messages and levels remain the same. The `ts` label for the timestamp has bewen replaced with `time`, the accuracy is less, and the timezone is not forced to UTC. The `caller` field has been replaced by the `source` field, which now includes the full path to the source file. The `level` field now exposes the log level in capital letters.
32+
33+
* [CHANGE] Replace logging system #1073
34+
* [ENHANCEMENT] Add save_wal_size and wal_status to replication_slot collector #1027
35+
* [ENHANCEMENT] Add roles collector and connection limit metrics to database collector #997
36+
* [ENHANCEMENT] Excluded databases log messgae is now info level #1003
37+
* [ENHANCEMENT] Add active_time to stat_database collector #961
38+
* [ENHANCEMENT] Add slot_type label to replication_slot collector #960
39+
* [BUGFIX] Fix walreceiver collectore when no repmgr #1086
40+
* [BUGFIX] Remove logging errors on replicas #1048
41+
* [BUGFIX] Fix active_time query on postgres>=14 #1045
42+
43+
## 0.15.0 / 2023-10-27
44+
45+
* [ENHANCEMENT] Add 1kB and 2kB units #915
46+
* [BUGFIX] Add error log when probe collector creation fails #918
47+
* [BUGFIX] Fix test build failures on 32-bit arch #919
48+
* [BUGFIX] Adjust collector to use separate connection per scrape #936
49+
50+
## 0.14.0 / 2023-09-11
51+
52+
* [CHANGE] Add `state` label to pg_process_idle_seconds #862
53+
* [CHANGE] Change database connections to one per scrape #882 #902
54+
* [ENHANCEMENT] Add wal collector #858
55+
* [ENHANCEMENT] Add database_wraparound collector #834
56+
* [ENHANCEMENT] Add stat_activity_autovacuum collector #840
57+
* [ENHANCEMENT] Add stat_wal_receiver collector #844
58+
* [ENHANCEMENT] Add xlog_location collector #849
59+
* [ENHANCEMENT] Add statio_user_indexes collector #845
60+
* [ENHANCEMENT] Add long_running_transactions collector #836
61+
* [ENHANCEMENT] Add pg_stat_user_tables_size_bytes metric #904
62+
* [BUGFIX] Fix tests on 32-bit systems #857
63+
* [BUGFIX] Fix pg_stat_statements metrics on Postgres 13+ #874 #876
64+
* [BUGFIX] Fix pg_stat_database metrics for NULL stats_reset #877
65+
* [BUGFIX] Fix pg_replication_lag_seconds on Postgres 10+ when master is idle #895
66+
167
## 0.13.2 / 2023-07-21
268

369
* [BUGFIX] Fix type issues on pg_postmaster metrics #828

Makefile.common

+23-9
Original file line numberDiff line numberDiff line change
@@ -49,23 +49,23 @@ endif
4949
GOTEST := $(GO) test
5050
GOTEST_DIR :=
5151
ifneq ($(CIRCLE_JOB),)
52-
ifneq ($(shell command -v gotestsum > /dev/null),)
52+
ifneq ($(shell command -v gotestsum 2> /dev/null),)
5353
GOTEST_DIR := test-results
5454
GOTEST := gotestsum --junitfile $(GOTEST_DIR)/unit-tests.xml --
5555
endif
5656
endif
5757

58-
PROMU_VERSION ?= 0.15.0
58+
PROMU_VERSION ?= 0.17.0
5959
PROMU_URL := https://github.com./prometheus/promu/releases/download/v$(PROMU_VERSION)/promu-$(PROMU_VERSION).$(GO_BUILD_PLATFORM).tar.gz
6060

6161
SKIP_GOLANGCI_LINT :=
6262
GOLANGCI_LINT :=
6363
GOLANGCI_LINT_OPTS ?=
64-
GOLANGCI_LINT_VERSION ?= v1.54.2
65-
# golangci-lint only supports linux, darwin and windows platforms on i386/amd64.
64+
GOLANGCI_LINT_VERSION ?= v2.0.2
65+
# golangci-lint only supports linux, darwin and windows platforms on i386/amd64/arm64.
6666
# windows isn't included here because of the path separator being different.
6767
ifeq ($(GOHOSTOS),$(filter $(GOHOSTOS),linux darwin))
68-
ifeq ($(GOHOSTARCH),$(filter $(GOHOSTARCH),amd64 i386))
68+
ifeq ($(GOHOSTARCH),$(filter $(GOHOSTARCH),amd64 i386 arm64))
6969
# If we're in CI and there is an Actions file, that means the linter
7070
# is being run in Actions, so we don't need to run it here.
7171
ifneq (,$(SKIP_GOLANGCI_LINT))
@@ -169,16 +169,20 @@ common-vet:
169169
common-lint: $(GOLANGCI_LINT)
170170
ifdef GOLANGCI_LINT
171171
@echo ">> running golangci-lint"
172-
# 'go list' needs to be executed before staticcheck to prepopulate the modules cache.
173-
# Otherwise staticcheck might fail randomly for some reason not yet explained.
174-
$(GO) list -e -compiled -test=true -export=false -deps=true -find=false -tags= -- ./... > /dev/null
175172
$(GOLANGCI_LINT) run $(GOLANGCI_LINT_OPTS) $(pkgs)
176173
endif
177174

175+
.PHONY: common-lint-fix
176+
common-lint-fix: $(GOLANGCI_LINT)
177+
ifdef GOLANGCI_LINT
178+
@echo ">> running golangci-lint fix"
179+
$(GOLANGCI_LINT) run --fix $(GOLANGCI_LINT_OPTS) $(pkgs)
180+
endif
181+
178182
.PHONY: common-yamllint
179183
common-yamllint:
180184
@echo ">> running yamllint on all YAML files in the repository"
181-
ifeq (, $(shell command -v yamllint > /dev/null))
185+
ifeq (, $(shell command -v yamllint 2> /dev/null))
182186
@echo "yamllint not installed so skipping"
183187
else
184188
yamllint .
@@ -204,6 +208,10 @@ common-tarball: promu
204208
@echo ">> building release tarball"
205209
$(PROMU) tarball --prefix $(PREFIX) $(BIN_DIR)
206210

211+
.PHONY: common-docker-repo-name
212+
common-docker-repo-name:
213+
@echo "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)"
214+
207215
.PHONY: common-docker $(BUILD_DOCKER_ARCHS)
208216
common-docker: $(BUILD_DOCKER_ARCHS)
209217
$(BUILD_DOCKER_ARCHS): common-docker-%:
@@ -267,3 +275,9 @@ $(1)_precheck:
267275
exit 1; \
268276
fi
269277
endef
278+
279+
govulncheck: install-govulncheck
280+
govulncheck ./...
281+
282+
install-govulncheck:
283+
command -v govulncheck > /dev/null || go install golang.org/x/vuln/cmd/govulncheck@latest

0 commit comments

Comments
 (0)