Commit Graph

593 Commits

Author SHA1 Message Date
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
Joe Adams
c3eec6263b
Merge pull request #871 from Sticksman/bugfix/add-logger-stat-database
Add a logger to stat_database collector
2023-07-20 09:27:12 -04:00
Felix Yuan
12c12cf368 Add a logger to stat_database collector to get better handle on error
(also clean up some metric validity checks)

Signed-off-by: Felix Yuan <felix.yuan@reddit.com>
2023-07-19 14:26:41 -07:00
Felix Yuan
4aa8cd4996
Gitlab collector: Database wraparound collector and test (#834)
* Database wraparound collector and test

---------

Signed-off-by: Felix Yuan <felix.yuan@reddit.com>
Co-authored-by: Joe Adams <github@joeadams.io>
2023-07-14 22:42:12 +02:00
Joe Adams
4ac5481917
Merge pull request #862 from tomhughes/idle-state
Include all idle processes in the process idle metrics
2023-07-06 19:58:39 -04:00
Joe Adams
9a9a4294c4
Merge pull request #863 from prometheus-community/repo_sync
Synchronize common files from prometheus/prometheus
2023-07-06 14:19:11 -04:00
prombot
c514fcad2d Update common Prometheus files
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2023-07-06 17:49:55 +00:00
PrometheusBot
d7766801fd
Update common Prometheus files (#860)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
Co-authored-by: Ben Kochie <superq@gmail.com>
2023-07-06 14:13:24 +02:00
Ben Kochie
5f917ccdd9
Improve linting (#861)
* Disable unused-parameter check due to false positives on Collect()
  calls.
* Enable misspell.
* Simplify error returns.

Signed-off-by: SuperQ <superq@gmail.com>
2023-07-06 13:08:45 +02:00
Tom Hughes
a8b86cf7da Include all idle processes in the process idle metrics
Signed-off-by: Tom Hughes <tom@compton.nu>
2023-07-06 08:48:59 +01:00
Tom Hughes
6b56e2f057
Unpack postgres arrays for process idle times correctly (#855)
Signed-off-by: Ben Kochie <superq@gmail.com>
2023-07-06 09:33:54 +02:00
dependabot[bot]
401711b2e3
Bump github.com/smartystreets/goconvey from 1.8.0 to 1.8.1 (#852)
Bumps [github.com/smartystreets/goconvey](https://github.com/smartystreets/goconvey) from 1.8.0 to 1.8.1.
- [Release notes](https://github.com/smartystreets/goconvey/releases)
- [Commits](https://github.com/smartystreets/goconvey/compare/v1.8.0...v1.8.1)

---
updated-dependencies:
- dependency-name: github.com/smartystreets/goconvey
  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>
2023-07-06 08:42:23 +02:00
Daniel Swarbrick
2477aba363
Fix untyped integer overflows on 32-bit archs (#857)
go-sqlmock's Rows.AddRow() takes values which have a type alias of
"any", and appear to default to untyped ints if not explicitly cast.
When large values are passed which would overflow int32, tests fail.

Signed-off-by: Daniel Swarbrick <daniel.swarbrick@gmail.com>
2023-07-05 15:10:47 +02:00
dependabot[bot]
a6012e0b54
Bump github.com/prometheus/client_golang from 1.15.1 to 1.16.0 (#853)
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.15.1 to 1.16.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.15.1...v1.16.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>
2023-07-05 15:10:03 +02:00
Joe Adams
cf67a472d0
Merge pull request #858 from tomhughes/wal
Add a collector to gather metrics on WAL size
2023-07-05 08:53:04 -04:00
Tom Hughes
2ca1798188 Add a collector to gather metrics on WAL size
Signed-off-by: Tom Hughes <tom@compton.nu>
2023-07-05 11:51:57 +01:00
Tom Hughes
099d3ddb6f Add some more escapes to the query sanitizer
Signed-off-by: Tom Hughes <tom@compton.nu>
2023-07-04 19:08:35 +01:00
Joe Adams
d01184f28d
Merge pull request #854 from tomhughes/replication
Fix replication collector
2023-07-03 13:00:20 -04:00