-
Notifications
You must be signed in to change notification settings - Fork 13
PMM-7 pull upstream changes #171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Eric tyrrell <eric.tyrrell18+github@gmail.com>
Signed-off-by: Joe Adams <github@joeadams.io>
Another case of untyped integer overflows on 32-bit arch. Signed-off-by: Daniel Swarbrick <daniel.swarbrick@gmail.com>
Run Go tests with 32-bit to validate value overflow. Signed-off-by: SuperQ <superq@gmail.com>
* 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] <support@github.com> * Update tests for latest client_golang. Signed-off-by: SuperQ <superq@gmail.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: SuperQ <superq@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: SuperQ <superq@gmail.com>
Signed-off-by: prombot <prometheus-team@googlegroups.com>
Fixes #921 Signed-off-by: Joe Adams <github@joeadams.io>
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] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: prombot <prometheus-team@googlegroups.com>
|
Signed-off-by: prombot <prometheus-team@googlegroups.com>
Signed-off-by: Alex Simenduev <shamil.si@gmail.com>
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] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* feat(pg_stat_database): active time metric --------- Signed-off-by: Jiri Sveceny <jiri.sveceny@icloud.com>
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] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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 <keegan.csmith@gmail.com>
* Add database connection limits metrics Signed-off-by: Jocelyn Thode <jocelyn@thode.email> * Add roles connection limits metrics Signed-off-by: Jocelyn Thode <jocelyn@thode.email> * Fix copyright year Co-authored-by: Joe Adams <github@joeadams.io> Signed-off-by: Jocelyn Thode <jocelynthode@users.noreply.github.com> * Fix spacing in pgDatabaseQuery Co-authored-by: Joe Adams <github@joeadams.io> Signed-off-by: Jocelyn Thode <jocelynthode@users.noreply.github.com> * Fix case on pgRolesConnectionLimitsQuery Co-authored-by: Joe Adams <github@joeadams.io> Signed-off-by: Jocelyn Thode <jocelynthode@users.noreply.github.com> * Do not add roleMetrics when row is not valid Signed-off-by: Jocelyn Thode <jocelyn@thode.email> --------- Signed-off-by: Jocelyn Thode <jocelyn@thode.email> Signed-off-by: Jocelyn Thode <jocelynthode@users.noreply.github.com> Co-authored-by: Joe Adams <github@joeadams.io>
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] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* feat: Add safe_wal_size to replication_slot Signed-off-by: MarcWort <113890636+MarcWort@users.noreply.github.com> * feat: Add wal_status to replication_slot Signed-off-by: MarcWort <113890636+MarcWort@users.noreply.github.com> --------- Signed-off-by: MarcWort <113890636+MarcWort@users.noreply.github.com>
Signed-off-by: MarcWort <113890636+MarcWort@users.noreply.github.com>
Better example for the quick start with prometheus config and avoiding deprecated env variables. Signed-off-by: fhackenberger <florian@hackenberger.at>
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] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…tes (#1149) * Record table only size bytes as well in addition to the total size bytes Signed-off-by: Felix Yuan <felix.yuan@reddit.com> * Update collector/pg_stat_user_tables.go Co-authored-by: Ben Kochie <superq@gmail.com> Signed-off-by: Felix Yuan <felix.yuan@reddit.com> * Update collector/pg_stat_user_tables.go Co-authored-by: Ben Kochie <superq@gmail.com> Signed-off-by: Felix Yuan <felix.yuan@reddit.com> * Finish renaming elements to index and table size Signed-off-by: Felix Yuan <felix.yuan@reddit.com> --------- Signed-off-by: Felix Yuan <felix.yuan@reddit.com> Co-authored-by: Ben Kochie <superq@gmail.com>
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] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: prombot <prometheus-team@googlegroups.com>
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.21.1 to 1.22.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.21.1...v1.22.0) --- updated-dependencies: - dependency-name: github.com/prometheus/client_golang dependency-version: 1.22.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…940) * Export query itself together with queryId in stat_statement metrics * The feature must be enabled via flag. * Limit length of selected query. The query is not added to every metrics, but instead of new metric stat_statement_query_id is introduced that contains mapping between queryId and query. Fixes: #813 --------- Signed-off-by: Jakub Štiller <stiller@2n.cz> Signed-off-by: Jakub Štiller <jakstiller@atlas.cz>
Signed-off-by: prombot <prometheus-team@googlegroups.com>
* Update querySettings Error Return in Scrape If there are errors querying namespace mappings, the potential error from querySettings is obscured. Adding an immediate return if there are errors retreiving settings. Signed-off-by: Jonathan Bowe <jonathan@bowedev.com> * Improve Verbosity of queryNamespaceMappings Errors Previously if any errors were encountered by queryNamespaceMappings, only a count of those errors was returned - making debugging those errors harder than it needs to be. I'm changing this to immediately return nil if no errors are encountered, and otherwise an error will be formatted with each of the namespaces and what the error was for that namespace. Signed-off-by: Jonathan Bowe <jonathan@bowedev.com> * Simplify Error Message Co-authored-by: Ben Kochie <superq@gmail.com> Signed-off-by: Jonathan Bowe <bowejonathan99@gmail.com> --------- Signed-off-by: Jonathan Bowe <jonathan@bowedev.com> Signed-off-by: Jonathan Bowe <bowejonathan99@gmail.com> Co-authored-by: Ben Kochie <superq@gmail.com>
* Add a collector for pg_buffercache_summary() * Requires PostgreSQL >= 16. --------- Signed-off-by: Peter Nuttall <peter.nuttall@snowflake.com> Co-authored-by: Ben Kochie <superq@gmail.com>
Signed-off-by: prombot <prometheus-team@googlegroups.com>
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.63.0 to 0.64.0. - [Release notes](https://github.com/prometheus/common/releases) - [Changelog](https://github.com/prometheus/common/blob/main/RELEASE.md) - [Commits](prometheus/common@v0.63.0...v0.64.0) --- updated-dependencies: - dependency-name: github.com/prometheus/common dependency-version: 0.64.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.64.0 to 0.65.0. - [Release notes](https://github.com/prometheus/common/releases) - [Changelog](https://github.com/prometheus/common/blob/main/RELEASE.md) - [Commits](prometheus/common@v0.64.0...v0.65.0) --- updated-dependencies: - dependency-name: github.com/prometheus/common dependency-version: 0.65.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: prombot <prometheus-team@googlegroups.com>
Minor fixes as I was skimming through: - fix typo in `stat_statements` - drop custom `sliceContains` in `database` Signed-off-by: Cristian Greco <cristian@regolo.cc>
Signed-off-by: prombot <prometheus-team@googlegroups.com>
Followup of #1176 Signed-off-by: Cristian Greco <cristian@regolo.cc>
Signed-off-by: Sam DeHaan <sam.dehaan@grafana.com> Signed-off-by: Sam DeHaan <dehaansa@gmail.com> Co-authored-by: Sam DeHaan <sam.dehaan@grafana.com> Co-authored-by: Sam DeHaan <dehaansa@gmail.com>
* Update mixin to latest changes from grafana/postgres_exporter Porting a bunch of PRs accumulated over time in grafana/postgres_exporter: - grafana#11 (@v-zhuravlev) - grafana#12 (@gaantunes) - grafana#13 (@gaantunes) - grafana#14 (@gaantunes) - grafana#15 (@gaantunes) - grafana#16 (@gaantunes) - grafana#17 (@gaantunes) - grafana#20 (@gaantunes) - grafana#21 (@mshahzeb) - grafana#22 (@mshahzeb) Signed-off-by: Cristian Greco <cristian@regolo.cc> * rename dashboard to old name Signed-off-by: Cristian Greco <cristian@regolo.cc> * remove custom selector Signed-off-by: Cristian Greco <cristian@regolo.cc> --------- Signed-off-by: Cristian Greco <cristian@regolo.cc> Co-authored-by: Vitaly <v-zhuravlev@users.noreply.github.com>
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.22.0 to 1.23.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.22.0...v1.23.0) --- updated-dependencies: - dependency-name: github.com/prometheus/client_golang dependency-version: 1.23.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: prombot <prometheus-team@googlegroups.com>
Signed-off-by: prombot <prometheus-team@googlegroups.com>
- Update github.com/prometheus/client_golang to v1.23.1 - Update github.com/prometheus/common to v0.66.1 - Update github.com/prometheus/exporter-toolkit to v0.14.1 Signed-off-by: Cristian Greco <cristian@regolo.cc>
* Prepare release `0.18.0` * [FEATURE] Add `stat_progress_vacuum` collector by @ianbibby * [FEATURE] Add `buffercache_summary` collector by @sfc-gh-pnuttall * [FEATURE] `stat_statements`: export query itself together with `queryId` by @Delorien84 * [ENHANCEMENT] Update Go version by @SuperQ * [ENHANCEMENT] Improve error handling for `Server.Scrape` by @BoweFlex * [ENHANCEMENT] `stat_user_tables`: record table-only size bytes in addition to the total size bytes by @Sticksman * [ENHANCEMENT] (chore) Fix a typo and use `slices.Contains` by @cristiangreco * [ENHANCEMENT] Update mixin to latest changes from `grafana/postgres_exporter` by @cristiangreco, @gaantunes, @v-zhuravlev and @mshahzeb * [ENHANCEMENT] Exclude the metrics fetching session's data from pg_stat_activity by @kmoppel * [BUGFIX] Ensure database connections are always closed by @cristiangreco and @dehaansa Signed-off-by: Cristian Greco <cristian@regolo.cc> * rm entry about go update Co-authored-by: Joe Adams <github@joeadams.io> Signed-off-by: Cristian Greco <cristian@regolo.cc> * add PRs Signed-off-by: Cristian Greco <cristian@regolo.cc> * update date Signed-off-by: Cristian Greco <cristian@regolo.cc> --------- Signed-off-by: Cristian Greco <cristian@regolo.cc> Co-authored-by: Joe Adams <github@joeadams.io>
…lector (#1198) In `pgStatWalReceiverQueryTemplate`, the order of the columns (when `hasFlushedLSN == true`) is: - ... - `receive_start_lsn` - `flushed_lsn` - `receive_start_tli` - ... However, columns were scanned in this order: - ... - `receive_start_lsn` -> `receiveStartLsn` - `receive_start_tli` -> `flushedLsn` (!) - `flushed_lsn` -> `receiveStartTli` (!) - ... This incorrect hydration of variables also manifests as swapped values for the `pg_stat_wal_receiver_flushed_lsn` and `pg_stat_wal_receiver_receive_start_tli` metrics. This seems to be a bug that has existed since the initial implementation: - 2d7e152 - #844 In this patch, I'm: - fixing the `.Scan()`, so that it hydrates variables in the correct order - adjusting the order in which metrics are pushed out to the channel, to follow the order we consume them in (.., `receive_start_lsn`, `flushed_lsn`, `receive_start_tli`, ..) - adjusting the walreceiver tests, to follow the new order (which matches .`Scan()`) - fixing a small identation issue in `pgStatWalReceiverQueryTemplate` Signed-off-by: Slavi Pantaleev <slavi@devture.com>
* [BUGFIX] Fix swapped `flushedLsn` and `receiveStartTli` for `wal_receiver` collector by @spantaleev in #1198 * [BUGFIX] Fix superfluous semicolon breaking query in `process_idle` by @sysadmind in #1197 and #1201 Signed-off-by: Cristian Greco <cristian@regolo.cc>
* Update minimum supported Go to 1.24.0. * Update Go build to 1.25.x. * Update PostgreSQL testing versions. Signed-off-by: SuperQ <superq@gmail.com>
Add `.limit` CLI flag to `stat_statements` collector to allow setting a custom number of queries to be returned. Signed-off-by: Cristian Greco <cristian@regolo.cc>
No description provided.