Commit Graph

574 Commits

Author SHA1 Message Date
Nicolas Rodriguez
bea2609519
Checkpoint related columns in PG 17 have been moved from pg_stat_bgwriter to pg_stat_checkpointer (#1072)
* Checkpoint related columns in PG 17 have been moved from pg_stat_bgwriter to pg_stat_checkpointer

Fix https://github.com/prometheus-community/postgres_exporter/issues/1060

See: https://www.dbi-services.com/blog/postgresql-17-new-catalog-view-pg_stat_checkpointer/
Signed-off-by: Nicolas Rodriguez <nico@nicoladmin.fr>

* 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 <nico@nicoladmin.fr>

* Run integration tests with Postgres 17

Signed-off-by: Nicolas Rodriguez <nico@nicoladmin.fr>

* Update date in file header

Signed-off-by: Nicolas Rodriguez <nico@nicoladmin.fr>

---------

Signed-off-by: Nicolas Rodriguez <nico@nicoladmin.fr>
2025-01-01 16:03:43 -05:00
dependabot[bot]
5145620988
Bump github.com/prometheus/exporter-toolkit from 0.13.1 to 0.13.2 (#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](https://github.com/prometheus/exporter-toolkit/compare/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] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-01 18:36:32 +01:00
aagarwalla-fx
5bb1702321
Fix to replace dashes with underscore in the metric names (#1103)
* Fix to replace dashes with underscore in the metric names

Signed-off-by: aagarwalla-fx <arpit.agarwalla@falconx.io>

* Code style fix

Signed-off-by: aagarwalla-fx <arpit.agarwalla@falconx.io>

---------

Signed-off-by: aagarwalla-fx <arpit.agarwalla@falconx.io>
2024-12-22 16:14:19 -05:00
Jyothi Kiran Thammana
6f36adfadf
Update pg_long_running_transactions.go (#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 <147131742+jyothikirant-sayukth@users.noreply.github.com>
2024-12-22 15:09:35 -05:00
Joe Adams
a324fe37bc
Fix version header in changelog (#1089)
Signed-off-by: Joe Adams <github@joeadams.io>
2024-11-10 16:05:34 -05:00
Joe Adams
4abdfa5bfd
Update changelog and version for a v0.16.0 release (#1088)
Signed-off-by: Joe Adams <github@joeadams.io>
2024-11-10 15:55:46 -05:00
PrometheusBot
0045c4f93e
Update common Prometheus files (#1087)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2024-11-08 19:51:27 +01:00
dependabot[bot]
340a104d25
Bump github.com/prometheus/exporter-toolkit from 0.13.0 to 0.13.1 (#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](https://github.com/prometheus/exporter-toolkit/compare/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] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-06 18:48:19 +01:00
PrometheusBot
c52405ab48
Update common Prometheus files (#1083)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2024-11-06 18:47:57 +01:00
Conrad Hoffmann
552ff92f8b
Make walreceiver collector useful w/o repmgr (#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 <ch@bitfehler.net>
2024-11-06 18:47:30 +01:00
dependabot[bot]
f9c74570ed
Bump github.com/prometheus/common from 0.60.0 to 0.60.1 (#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](https://github.com/prometheus/common/compare/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] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-27 21:28:26 +01:00
dependabot[bot]
071ebb6244
Bump github.com/prometheus/client_golang from 1.20.4 to 1.20.5 (#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](https://github.com/prometheus/client_golang/compare/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] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-26 22:28:29 +02:00
TJ Hoplock
e8540767e4
chore!: adopt log/slog, drop go-kit/log (#1073)
* ci: update go to version 1.23

Signed-off-by: TJ Hoplock <t.hoplock@gmail.com>

* build(deps): bump prometheus/{client_golang,common,exporter-toolkit}

Signed-off-by: TJ Hoplock <t.hoplock@gmail.com>

* 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 <t.hoplock@gmail.com>

---------

Signed-off-by: TJ Hoplock <t.hoplock@gmail.com>
Co-authored-by: Ben Kochie <superq@gmail.com>
2024-10-26 21:44:17 +02:00
PrometheusBot
3743987494
Update common Prometheus files (#1076)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2024-10-26 16:37:52 +02:00
PrometheusBot
3be4edccd4
Update common Prometheus files (#983)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2024-10-17 17:47:21 +02:00
Steffen Zieger
98f75c7e7e
stop logging errors on replicas, fixes #547 (#1048)
Signed-off-by: Steffen Zieger <github@saz.sh>
2024-09-05 09:28:31 -04:00
fhackenberger
3c5ef40e2b
Update README.md (#1038)
Better example for the quick start with prometheus config and avoiding deprecated env variables.

Signed-off-by: fhackenberger <florian@hackenberger.at>
2024-07-06 12:36:52 -04:00
Marc W
49f66e1bfb
fix: Only query active_time on pg>=14 (#1045)
Signed-off-by: MarcWort <113890636+MarcWort@users.noreply.github.com>
2024-06-25 09:15:21 -04:00
Marc W
a4ac0e6747
feat: Add safe_wal_size and wal_status to replication_slot (#1027)
* 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>
2024-05-11 14:59:55 +02:00
dependabot[bot]
cc0fd2eda5
Bump golang.org/x/net from 0.20.0 to 0.23.0 (#1021)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.20.0 to 0.23.0.
- [Commits](https://github.com/golang/net/compare/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>
2024-04-21 15:39:52 -04:00
dependabot[bot]
ddd51368a1
Bump github.com/prometheus/exporter-toolkit from 0.10.0 to 0.11.0 (#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](https://github.com/prometheus/exporter-toolkit/compare/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>
2024-03-14 12:25:56 +01:00
dependabot[bot]
5ffc58cd28
Bump google.golang.org/protobuf from 1.32.0 to 1.33.0 (#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] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-13 22:19:36 -04:00
dependabot[bot]
b126e621db
Bump github.com/prometheus/client_model from 0.5.0 to 0.6.0 (#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](https://github.com/prometheus/client_model/compare/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>
2024-03-06 10:36:40 -05:00
dependabot[bot]
89087f1744
Bump github.com/prometheus/client_golang from 1.18.0 to 1.19.0 (#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](https://github.com/prometheus/client_golang/compare/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>
2024-03-06 09:30:47 -05:00
dependabot[bot]
838f09c97f
Bump github.com/DATA-DOG/go-sqlmock from 1.5.0 to 1.5.2 (#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](https://github.com/DATA-DOG/go-sqlmock/compare/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>
2024-02-21 22:03:36 -05:00
Jocelyn Thode
8f39f5b114
Add connection limits metrics for pg_roles and pg_database (#997)
* 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>
2024-02-21 21:10:17 -05:00
Keegan Carruthers-Smith
f98834a678
use Info level for excluded databases log message (#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 <keegan.csmith@gmail.com>
2024-02-14 13:38:27 -05:00
dependabot[bot]
9cfa132115
Bump github.com/prometheus/client_golang from 1.17.0 to 1.18.0 (#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](https://github.com/prometheus/client_golang/compare/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>
2024-01-02 18:12:56 -05:00
dependabot[bot]
825cc8af13
Bump golang.org/x/crypto from 0.14.0 to 0.17.0 (#988)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.14.0 to 0.17.0.
- [Commits](https://github.com/golang/crypto/compare/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>
2023-12-21 14:10:42 -05:00
Jiri Sveceny
f5b613aba7
pg_stat_database: added support for active_time counter (#961)
* feat(pg_stat_database): active time metric

---------

Signed-off-by: Jiri Sveceny <jiri.sveceny@icloud.com>
2023-11-28 15:12:07 +01:00
dependabot[bot]
5ceae7f414
Bump github.com/prometheus/client_model (#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] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-24 09:42:42 +01:00
dependabot[bot]
34f5443ca0
Bump github.com/prometheus/common from 0.44.0 to 0.45.0 (#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](https://github.com/prometheus/common/compare/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>
2023-11-23 09:45:22 +01:00
Alex Simenduev
ae1375b28e
pg_replication_slot: add slot type label (#960)
Signed-off-by: Alex Simenduev <shamil.si@gmail.com>
2023-11-23 09:44:58 +01:00
PrometheusBot
f0ea0163bb
Update common Prometheus files (#963)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2023-11-23 09:42:58 +01:00
PrometheusBot
94b0651246
Update common Prometheus files (#951)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2023-11-14 22:03:52 -05:00
Ben Kochie
68c176b883
Release v0.15.0 (#944)
* [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 <superq@gmail.com>
2023-10-27 16:25:39 +02:00
dependabot[bot]
e2892a7976
Bump golang.org/x/net from 0.10.0 to 0.17.0 (#936)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.10.0 to 0.17.0.
- [Commits](https://github.com/golang/net/compare/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>
2023-10-16 13:57:17 +02:00
Joe Adams
2a5692c028
Adjust collector to use separate connection per scrape (#931)
Fixes #921

Signed-off-by: Joe Adams <github@joeadams.io>
2023-10-10 07:07:37 -04:00
PrometheusBot
f0f051cb9a
Update common Prometheus files (#926)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2023-10-08 08:02:26 -04:00
dependabot[bot]
69fc35b0ec
Bump github.com/prometheus/client_golang from 1.16.0 to 1.17.0 (#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](https://github.com/prometheus/client_golang/compare/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>
2023-10-02 16:00:41 +02:00
Ben Kochie
5e24d43e3e
Add 32-bit testing to CI (#920)
Run Go tests with 32-bit to validate value overflow.

Signed-off-by: SuperQ <superq@gmail.com>
2023-09-21 15:27:00 +02:00
Daniel Swarbrick
51415a0e5b
Fix test build failures on 32-bit arch again (#919)
Another case of untyped integer overflows on 32-bit arch.

Signed-off-by: Daniel Swarbrick <daniel.swarbrick@gmail.com>
2023-09-21 14:58:46 +02:00
Joe Adams
30d7d25a7e
Add error log when probe collector creation fails (#918)
Signed-off-by: Joe Adams <github@joeadams.io>
2023-09-21 07:13:14 -04:00
Eric Tyrrell
e3eaa91c0b
Adds 1kB and 2kB units (#915)
Signed-off-by: Eric tyrrell <eric.tyrrell18+github@gmail.com>
2023-09-19 21:40:29 -04:00
Joe Adams
c06e57db4e
Add changelog for v0.14 (#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 <github@joeadams.io>

* Add changelog entry for #904

Signed-off-by: Joe Adams <github@joeadams.io>

---------

Signed-off-by: Joe Adams <github@joeadams.io>
2023-09-19 21:27:45 -04:00
PrometheusBot
add5b86cff
Update common Prometheus files (#913)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2023-09-17 11:04:14 +02:00
Joe Adams
4e521d460e
Fix bugs mentioned in #908 (#910)
* Fix bugs mentioned in #908

These collectors are disabled by default, so unless enabled, they are not tested regularly.

Signed-off-by: Joe Adams <github@joeadams.io>

---------

Signed-off-by: Joe Adams <github@joeadams.io>
2023-09-13 09:19:21 -04:00
David Cook
31ef4ed5a2
stat_user_tables: Add total size metric (#904)
Signed-off-by: David Cook <dcook@divviup.org>
2023-09-12 09:07:36 -04:00
Vladimir Luksha
0b6d9860ab
fix pg_replication_lag_seconds (#895)
Signed-off-by: Vladimir Luksha <waldemarluksha@gmail.com>
Co-authored-by: Vladimir Luksha <luksha@limcore.io>
2023-09-08 16:20:19 -04:00
David Cook
dbc7b0b229
Fix cross-compilation command in README.md (#903)
Signed-off-by: David Cook <dcook@divviup.org>
2023-09-08 16:08:06 -04:00