Commit Graph

560 Commits

Author SHA1 Message Date
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
Christian Albrecht
68ea167866
Fix a connection leak (#902)
The leak was introduced in PR#882

Signed-off-by: Christian Albrecht <cal@albix.de>
Co-authored-by: Christian Albrecht <christian.albrecht@akquinet.de>
2023-09-05 22:07:37 -04:00
PrometheusBot
a181fba674
Update common Prometheus files (#900)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2023-09-03 08:49:01 +02:00
Felix Yuan
5890879126
Gitlab Collector: Long running transactions collector and test (#836)
* Long running transactions collector and test

---------

Signed-off-by: Felix Yuan <felix.yuan@reddit.com>
Co-authored-by: Ben Kochie <superq@gmail.com>
2023-08-25 11:20:10 +02:00
Mathis Raguin
ce4ee0507f
Update README to reflect changes made in #828 (#894)
Signed-off-by: Mathis Raguin <mathis.raguin@gitguardian.com>
2023-08-24 09:58:41 +02:00
Felix Yuan
ce74daee92
Gitlab Collector: User Index io stats collector and test (#845)
* User Index io stats collector and test

---------

Signed-off-by: Felix Yuan <felix.yuan@reddit.com>
2023-08-24 09:55:26 +02:00
Felix Yuan
2402783205
Bugfix: Make statsreset nullable (#877)
* Stats_reset as null seems to actually be legitimate for new databases,
so don't fail for it

---------

Signed-off-by: Felix Yuan <felix.yuan@reddit.com>
Co-authored-by: Ben Kochie <superq@gmail.com>
2023-08-24 09:51:26 +02:00
Joe Adams
b74852a535
Delay database connection until scrape (#882)
This no longer returns an error when creating a collector.instance when the database cannot be reached for the version query. This will resolve the entire postgresCollector not being registered for metrics collection when a database is not available. If the version query fails, the scrape will fail.

Resolves #880

Signed-off-by: Joe Adams <github@joeadams.io>
2023-08-23 17:33:47 -04:00
Ben Kochie
04bb60ce31
Add a multi-target example config (#890)
Add an example Prometheus scrape config, similar to the
blackbox_exporter's example config.

Fixes: https://github.com/prometheus-community/postgres_exporter/issues/888

Signed-off-by: SuperQ <superq@gmail.com>
2023-08-15 13:49:05 +02:00
Ben Kochie
716ac23f20
Fixup new pg_stats_statements query (#876)
Fix all renames of `total_time` to `total_exec_time`.

Fixes: https://github.com/prometheus-community/postgres_exporter/issues/502

Signed-off-by: SuperQ <superq@gmail.com>
2023-07-25 22:36:51 +02:00
Ben Kochie
f9277b04b7
Handle new pg_stat_statements column names (#874)
Update pg_stat_statements collector to handle the new column names in
PostgreSQL 13.

Fixes: https://github.com/prometheus-community/postgres_exporter/issues/502

Signed-off-by: SuperQ <superq@gmail.com>
2023-07-25 16:20:37 +02:00
Felix Yuan
74800f483a
Gitlab collector: Xlog location collector and test (#849)
* Xlog location collector and test

Signed-off-by: Felix Yuan <felix.yuan@reddit.com>

* Add more escapes

Signed-off-by: Felix Yuan <felix.yuan@reddit.com>

* Change to Gauge

Signed-off-by: Felix Yuan <felix.yuan@reddit.com>

---------

Signed-off-by: Felix Yuan <felix.yuan@reddit.com>
2023-07-21 14:42:43 -04:00
Felix Yuan
2d7e152751
Gitlab Collector: Wal Receiver Collector and Test (#844)
* Wal Receiver Collector and Test

Signed-off-by: Felix Yuan <felix.yuan@reddit.com>

* Add more escapes

Signed-off-by: Felix Yuan <felix.yuan@reddit.com>

* Corrections to wal_receiver

Signed-off-by: Felix Yuan <felix.yuan@reddit.com>

* Continue on null labels

Signed-off-by: Felix Yuan <felix.yuan@reddit.com>

* Skip nulls and log a message

Signed-off-by: Felix Yuan <felix.yuan@reddit.com>

* Redundant breaks

Signed-off-by: Felix Yuan <felix.yuan@reddit.com>

* Fix up walreceiver

Signed-off-by: Felix Yuan <felix.yuan@reddit.com>

* Remove extra label

Signed-off-by: Felix Yuan <felix.yuan@reddit.com>

* Update collector/pg_stat_walreceiver.go

Co-authored-by: Ben Kochie <superq@gmail.com>
Signed-off-by: Felix Yuan <felix.yuan@reddit.com>

* Clean up the extra assignments

Signed-off-by: Felix Yuan <felix.yuan@reddit.com>

* Update collector/pg_stat_walreceiver.go

Co-authored-by: Joe Adams <github@joeadams.io>
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>
Co-authored-by: Joe Adams <github@joeadams.io>
2023-07-21 14:42:08 -04:00
Felix Yuan
dc3e813f43
Gitlab Collector: Autovacuum collector and test (#840)
* Autovacuum collector and test

Signed-off-by: Felix Yuan <felix.yuan@reddit.com>

* Update collector/pg_stat_activity_autovacuum.go

Co-authored-by: Joe Adams <github@joeadams.io>
Signed-off-by: Felix Yuan <felix.yuan@reddit.com>

* Update collector/pg_stat_activity_autovacuum.go

Co-authored-by: Joe Adams <github@joeadams.io>
Signed-off-by: Felix Yuan <felix.yuan@reddit.com>

* Use timestamp seconds

Signed-off-by: Felix Yuan <felix.yuan@reddit.com>

* query formating

Signed-off-by: Felix Yuan <felix.yuan@reddit.com>

* SQL format

Signed-off-by: Felix Yuan <felix.yuan@reddit.com>

* Loosen autovacuum query

Signed-off-by: Felix Yuan <felix.yuan@reddit.com>

---------

Signed-off-by: Felix Yuan <felix.yuan@reddit.com>
Co-authored-by: Joe Adams <github@joeadams.io>
2023-07-21 14:41:25 -04:00
Joe Adams
24a45f2fe3
Update changelog for release 0.13.2 (#872)
Signed-off-by: Joe Adams <github@joeadams.io>
2023-07-21 14:20:19 -04:00