Skip to content

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

Draft
wants to merge 85 commits into
base: main
Choose a base branch
from

Conversation

BupycHuk
Copy link
Member

No description provided.

Eric-Tyrrell22 and others added 10 commits September 19, 2023 21:40
Signed-off-by: Eric tyrrell <[email protected]>

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Signed-off-by: Joe Adams <[email protected]>
Another case of untyped integer overflows on 32-bit arch.

Signed-off-by: Daniel Swarbrick <[email protected]>

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
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

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]>

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Signed-off-by: prombot <[email protected]>
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>

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
* [ENHANCEMENT] Add 1kB and 2kB units #915
* [BUGFIX] Add error log when probe collector creation fails #918
* [BUGFIX] Fix test build failures on 32-bit arch #919
* [BUGFIX] Adjust collector to use separate connection per scrape #936

Signed-off-by: SuperQ <[email protected]>
@it-percona-cla
Copy link

it-percona-cla commented Nov 15, 2023

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
0 out of 28 committers have signed the CLA.

❌ Eric-Tyrrell22
❌ sysadmind
❌ prombot
❌ sitole
❌ dswarbrick
❌ shamil
❌ SuperQ
❌ keegancsmith
❌ MarcWort
❌ saz
❌ fhackenberger
❌ bitfehler
❌ jyothikirant-sayukth
❌ aagarwalla-fx
❌ n-rodriguez
❌ tjhop
❌ jocelynthode
❌ Sticksman
❌ Delorien84
❌ BoweFlex
❌ fgalind1
❌ vancwo
❌ ianbibby
❌ sfc-gh-pnuttall
❌ michael-todorovic
❌ NevermindZ4
❌ khiemdoan
❌ cristiangreco
You have signed the CLA already but the status is still pending? Let us recheck it.

prombot and others added 19 commits November 23, 2023 09:42
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>
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>
* feat(pg_stat_database): active time metric

---------

Signed-off-by: Jiri Sveceny <[email protected]>
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>
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>
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 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]>
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>
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>
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>
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>
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>
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 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]>
Signed-off-by: MarcWort <[email protected]>
Better example for the quick start with prometheus config and avoiding deprecated env variables.

Signed-off-by: fhackenberger <[email protected]>
Signed-off-by: Steffen Zieger <[email protected]>
n-rodriguez and others added 30 commits February 19, 2025 21:49
* 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]>
Signed-off-by: Joe Adams <[email protected]>
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]>
* [BUGFIX] Fix: Handle incoming labels with invalid UTF-8 #1131

Signed-off-by: SuperQ <[email protected]>
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>
Signed-off-by: prombot <[email protected]>
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>
Signed-off-by: prombot <[email protected]>
Signed-off-by: prombot <[email protected]>
Signed-off-by: Ian Bibby <[email protected]>
Co-authored-by: Ben Kochie <[email protected]>
* Update Go to 1.24.
* Update golangci-lint to v2.
* Fixup linting issues.

Signed-off-by: SuperQ <[email protected]>
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>
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>
…tes (#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]>
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]>
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] <[email protected]>
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 <[email protected]>
Signed-off-by: Jakub Štiller <[email protected]>
Signed-off-by: prombot <[email protected]>
* 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 <[email protected]>

* 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 <[email protected]>

* Simplify Error Message

Co-authored-by: Ben Kochie <[email protected]>
Signed-off-by: Jonathan Bowe <[email protected]>

---------

Signed-off-by: Jonathan Bowe <[email protected]>
Signed-off-by: Jonathan Bowe <[email protected]>
Co-authored-by: Ben Kochie <[email protected]>
* Add a collector for pg_buffercache_summary()
* Requires PostgreSQL >= 16.
---------

Signed-off-by: Peter Nuttall <[email protected]>
Co-authored-by: Ben Kochie <[email protected]>
Signed-off-by: prombot <[email protected]>
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] <[email protected]>
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] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: prombot <[email protected]>
Minor fixes as I was skimming through:
- fix typo in `stat_statements`
- drop custom `sliceContains` in `database`

Signed-off-by: Cristian Greco <[email protected]>
Signed-off-by: prombot <[email protected]>
Followup of #1176

Signed-off-by: Cristian Greco <[email protected]>
Signed-off-by: Sam DeHaan <[email protected]>
Signed-off-by: Sam DeHaan <[email protected]>
Co-authored-by: Sam DeHaan <[email protected]>
Co-authored-by: Sam DeHaan <[email protected]>
* 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 <[email protected]>

* rename dashboard to old name

Signed-off-by: Cristian Greco <[email protected]>

* remove custom selector

Signed-off-by: Cristian Greco <[email protected]>

---------

Signed-off-by: Cristian Greco <[email protected]>
Co-authored-by: Vitaly <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet