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
Tom Hughes
d920553227
Fix replication collector
...
Signed-off-by: Tom Hughes <tom@compton.nu >
2023-07-03 17:51:50 +01:00
PrometheusBot
dcf498e709
Update common Prometheus files ( #829 )
...
Signed-off-by: prombot <prometheus-team@googlegroups.com >
2023-06-27 20:18:40 +02:00
Felix Yuan
e6ce2ecba9
Bug Fix: Fix lingering type issues ( #828 )
...
* Fix postmaster type issue
* Disable postmaster collector by default
---------
Signed-off-by: Felix Yuan <felix.yuan@reddit.com >
2023-06-27 20:18:02 +02:00
Ben Kochie
030a2a9bc7
Cleanup collectors ( #826 )
...
Fix up `replication` and `process_idle` Update input params to match
the rest of the collectors.
Signed-off-by: SuperQ <superq@gmail.com >
2023-06-27 16:40:12 +02:00
Ben Kochie
1a4e8993f6
Migrate pg_locks to collector package ( #817 )
...
Migrate the `pg_locks_count` query from `main` to the `collector`
package.
Signed-off-by: SuperQ <superq@gmail.com >
2023-06-27 15:59:30 +02:00
Vadim Voitenko
6a1bb59efb
Fixed replication pgReplicationSlotQuery - now it's working correctly for replica and primary ( #825 )
...
Signed-off-by: Vadim Voitenko <vadim.voitenko@exness.com >
Co-authored-by: Vadim Voitenko <vadim.voitenko@exness.com >
2023-06-27 15:47:33 +02:00
Ben Kochie
bf4e4fb6cc
Release 0.13.1 ( #824 )
...
* [BUGFIX] Make collectors not fail on null values #823
Signed-off-by: SuperQ <superq@gmail.com >
2023-06-27 13:13:41 +02:00
Felix Yuan
8d087f2c64
Bug fix: Make collector not fail on null values ( #823 )
...
* Make all values nullable
---------
Signed-off-by: Felix Yuan <felix.yuan@reddit.com >
Co-authored-by: Ben Kochie <superq@gmail.com >
2023-06-27 08:07:59 +02:00
Ben Kochie
629078694a
Merge pull request #820 from atymchuk/fix-a-few-syntax-errors
...
chore: fix a few typos
2023-06-23 15:55:15 +02:00
Alex Tymchuk
b070e45349
chore: fix a few typos
...
Signed-off-by: Alex Tymchuk <alexander.tymchuk@percona.com >
2023-06-23 16:42:59 +03:00
Ben Kochie
f550f8f8ad
Merge pull request #816 from prometheus-community/superq/0.13.0
...
Release v0.13.0
2023-06-22 09:03:47 +02:00
Ben Kochie
d983d32c1f
Merge pull request #785 from sysadmind/collector-instance
...
Add the instance struct to handle connections
2023-06-22 08:18:12 +02:00
Joe Adams
ab33346cbd
Add the instance struct to handle connections
...
The intent is to use the instance struct to hold the connection to the database as well as metadata about the instance. Currently this metadata only includes the version of postgres for the instance which can be used in the collectors to decide what query to run. In the future this could hold more metadata but for now it keeps the Collector interface arguments to a reasonable number.
Signed-off-by: Joe Adams <github@joeadams.io >
2023-06-21 20:36:59 -04:00
SuperQ
db08eee988
Release v0.13.0
...
BREAKING CHANGES:
Please note, the following features are deprecated and may be removed in a future release:
- `auto-discover-databases`
- `extend.query-path`
- `constantLabels`
- `exclude-databases`
- `include-databases`
This exporter is meant to monitor PostgresSQL servers, not the user data/databases. If
you need a generic SQL report exporter https://github.com/burningalchemist/sql_exporter
is recommended.
* [CHANGE] Adjust log level for collector startup #784
* [CHANGE] Move queries from queries.yaml to collectors #801
* [CHANGE] Deprecate extend queries feature #811
* [CHANGE] Deprecate additional database features #815
* [CHANGE] Convert pg_stat_database to new collector #685
* [ENHANCEMENT] Supports alternate postgres:// prefix in URLs #787
* [BUGFIX] Fix pg_setting different help values #771
* [BUGFIX] Fix column type for pg_replication_slots #777
* [BUGFIX] Fix pg_stat_database collector #809
Signed-off-by: SuperQ <superq@gmail.com >
2023-06-21 15:33:23 +02:00
Joe Adams
5db7cfba22
Merge pull request #815 from prometheus-community/superq/deprecate_databases
...
Deprecate additional database features
2023-06-21 09:03:26 -04:00
SuperQ
c71d395bf6
Deprecate additional database features
...
Now that we have deprecated extended queries we can deprecate related
database features.
* Deprecate flags/functions around auto discover databases.
* Deprecate flags/functions for additional constant labels.
Signed-off-by: SuperQ <superq@gmail.com >
2023-06-19 13:05:57 +02:00