From db20e2516957f67fbe1c34f87053768e4a9c2971 Mon Sep 17 00:00:00 2001 From: Cristian Greco Date: Tue, 30 Sep 2025 13:27:53 +0200 Subject: [PATCH 1/4] Update postgres_exporter to v0.18.1 --- CHANGELOG.md | 2 ++ go.mod | 16 ++++++++-------- go.sum | 20 ++++++++++---------- 3 files changed, 20 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 03725d93c7..0f57e00ad7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,8 @@ Main (unreleased) - Reduce memory overhead of `prometheus.remote_write`'s WAL by lowering the size of the allocated series storage. (@kgeckhart) - Reduce lock wait/contention on the labelstore.LabelStore by removing unecessary usage from `prometheus.relabel`. (@kgeckhart) +- `prometheus.exporter.postgres` dependency has been updated to v0.18.1. (@cristiangreco) + - This includes new `stat_progress_vacuum` and `buffercache_summary` collectors, as well as other bugfixes and enhancements. ### Bugfixes diff --git a/go.mod b/go.mod index 1c186c1ff9..30ca770b6b 100644 --- a/go.mod +++ b/go.mod @@ -33,7 +33,7 @@ require ( github.com/burningalchemist/sql_exporter v0.0.0-20240103092044-466b38b6abc4 github.com/cespare/xxhash/v2 v2.3.0 github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf - github.com/coreos/go-systemd/v22 v22.5.0 + github.com/coreos/go-systemd/v22 v22.6.0 github.com/dimchansky/utfbom v1.1.1 github.com/docker/docker v28.3.3+incompatible github.com/docker/go-connections v0.6.0 @@ -181,7 +181,7 @@ require ( github.com/pkg/errors v0.9.1 github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 github.com/prometheus-community/elasticsearch_exporter v1.5.0 - github.com/prometheus-community/postgres_exporter v0.17.1 + github.com/prometheus-community/postgres_exporter v0.18.1 github.com/prometheus-community/stackdriver_exporter v0.18.0 github.com/prometheus-community/windows_exporter v0.31.1 // if you update the windows_exporter version, make sure to update the PROM_WIN_EXP_VERSION in _index github.com/prometheus-community/yet-another-cloudwatch-exporter v0.62.1 @@ -189,9 +189,9 @@ require ( github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.82.2 github.com/prometheus-operator/prometheus-operator/pkg/client v0.82.2 github.com/prometheus/blackbox_exporter v0.24.1-0.20230623125439-bd22efa1c900 - github.com/prometheus/client_golang v1.23.0 + github.com/prometheus/client_golang v1.23.1 github.com/prometheus/client_model v0.6.2 - github.com/prometheus/common v0.65.1-0.20250804173848-0ad974f9af53 + github.com/prometheus/common v0.66.1 github.com/prometheus/consul_exporter v0.8.0 github.com/prometheus/memcached_exporter v0.13.0 github.com/prometheus/mysqld_exporter v0.17.2 @@ -822,7 +822,7 @@ require ( github.com/prometheus-community/go-runit v0.1.0 // indirect github.com/prometheus-community/prom-label-proxy v0.11.0 // indirect github.com/prometheus/alertmanager v0.28.1 // indirect - github.com/prometheus/exporter-toolkit v0.14.0 // indirect + github.com/prometheus/exporter-toolkit v0.14.1 // indirect github.com/prometheus/otlptranslator v0.0.0-20250620074007-94f535e0c588 // indirect github.com/puzpuzpuz/xsync/v3 v3.5.1 // indirect github.com/rcrowley/go-metrics v0.0.0-20250401214520-65e299d6c5c9 // indirect @@ -1045,9 +1045,9 @@ replace ( // https://github.com/grafana/cadvisor/tree/grafana-v0.47-noglobals github.com/google/cadvisor => github.com/grafana/cadvisor v0.0.0-20240729082359-1f04a91701e2 - // TODO(dehaansa): integrate the changes from the exporter-package-v0.17.0 branch into at least the - // grafana fork of the exporter, or completely into upstream - github.com/prometheus-community/postgres_exporter => github.com/grafana/postgres_exporter v0.0.0-20250714124518-c5d0a4dad445 + // TODO(dehaansa,cristiangreco): this tracks the exporter-package-v0.18.1 branch of the grafana fork, + // which we could get rid of once the changes are merged upstream. + github.com/prometheus-community/postgres_exporter => github.com/grafana/postgres_exporter v0.0.0-20250930111128-c8f6a9f4d363 // TODO(marctc): remove once this PR is merged upstream: https://github.com/prometheus/mysqld_exporter/pull/774 github.com/prometheus/mysqld_exporter => github.com/grafana/mysqld_exporter v0.17.2-0.20250226152553-be612e3fdedd diff --git a/go.sum b/go.sum index 9706685c27..dc4c538078 100644 --- a/go.sum +++ b/go.sum @@ -691,8 +691,8 @@ github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7 github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf h1:iW4rZ826su+pqaw19uhpSCzhj44qo35pNgKFGqzDKkU= github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= -github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/coreos/go-systemd/v22 v22.6.0 h1:aGVa/v8B7hpb0TKl0MWoAavPDmHvobFe5R5zn0bCJWo= +github.com/coreos/go-systemd/v22 v22.6.0/go.mod h1:iG+pp635Fo7ZmV/j14KUcmEyWF+0X7Lua8rrTWzYgWU= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpuguy83/dockercfg v0.3.2 h1:DlJTyZGBDlXqUZ2Dk2Q3xHs/FtnooJJVaad2S9GKorA= github.com/cpuguy83/dockercfg v0.3.2/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc= @@ -1172,8 +1172,8 @@ github.com/grafana/opentelemetry-ebpf-profiler v0.0.202537-0.20250916114748-f2ff github.com/grafana/opentelemetry-ebpf-profiler v0.0.202537-0.20250916114748-f2ff2fc6048c/go.mod h1:ajmdC82d8daScIWPT0Mmq95lvGmoBNMdAUBlWv/Hwbg= github.com/grafana/otel-profiling-go v0.5.1 h1:stVPKAFZSa7eGiqbYuG25VcqYksR6iWvF3YH66t4qL8= github.com/grafana/otel-profiling-go v0.5.1/go.mod h1:ftN/t5A/4gQI19/8MoWurBEtC6gFw8Dns1sJZ9W4Tls= -github.com/grafana/postgres_exporter v0.0.0-20250714124518-c5d0a4dad445 h1:1rC8i0khfZdRA0/k7RBQQ84PhASNQLssezXHmFcWZ6Y= -github.com/grafana/postgres_exporter v0.0.0-20250714124518-c5d0a4dad445/go.mod h1:0elZWWHfbwJNwKbiKgBKaEXTDewatxCt9UFZaN6LZsA= +github.com/grafana/postgres_exporter v0.0.0-20250930111128-c8f6a9f4d363 h1:/vCopugIegPx9brm+E9+4bMQ6uIsZujCoE7su3bLLbk= +github.com/grafana/postgres_exporter v0.0.0-20250930111128-c8f6a9f4d363/go.mod h1:dOdKpz09HRMtkSs8kba90eNmrL81E+LMotcP7eW9/ek= github.com/grafana/prometheus v1.8.2-0.20250811161144-6e21f656d8e5 h1:3EpZnrtPndi1xtFKCrSELttNhykk9012DxKOeIH/bPY= github.com/grafana/prometheus v1.8.2-0.20250811161144-6e21f656d8e5/go.mod h1:ioGx2SGKTY+fLnJSQCdTHqARVldGNS8OlIe3kvp98so= github.com/grafana/pyroscope-go/godeltaprof v0.1.8 h1:iwOtYXeeVSAeYefJNaxDytgjKtUuKQbJqgAIjlnicKg= @@ -2075,8 +2075,8 @@ github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.23.0 h1:ust4zpdl9r4trLY/gSjlm07PuiBq2ynaXXlptpfy8Uc= -github.com/prometheus/client_golang v1.23.0/go.mod h1:i/o0R9ByOnHX0McrTMTyhYvKE4haaf2mW08I+jGAjEE= +github.com/prometheus/client_golang v1.23.1 h1:w6gXMLQGgd0jXXlote9lRHMe0nG01EbnJT+C0EJru2Y= +github.com/prometheus/client_golang v1.23.1/go.mod h1:br8j//v2eg2K5Vvna5klK8Ku5pcU5r4ll73v6ik5dIQ= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -2092,8 +2092,8 @@ github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9 github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.31.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.65.1-0.20250804173848-0ad974f9af53 h1:9UzEu3LNsyYUSEkNU6mfBwG8TpiURfaJQgz1rVQKmhs= -github.com/prometheus/common v0.65.1-0.20250804173848-0ad974f9af53/go.mod h1:LL3lcZII3UXGO4InbF+BTSsiAAPUBnwFVbp4gBWIMqw= +github.com/prometheus/common v0.66.1 h1:h5E0h5/Y8niHc5DlaLlWLArTQI7tMrsfQjHV+d9ZoGs= +github.com/prometheus/common v0.66.1/go.mod h1:gcaUsgf3KfRSwHY4dIMXLPV0K/Wg1oZ8+SbZk/HH/dA= github.com/prometheus/common/assets v0.2.0 h1:0P5OrzoHrYBOSM1OigWL3mY8ZvV2N4zIE/5AahrSrfM= github.com/prometheus/common/assets v0.2.0/go.mod h1:D17UVUE12bHbim7HzwUvtqm6gwBEaDQ0F+hIGbFbccI= github.com/prometheus/common/sigv4 v0.1.0 h1:qoVebwtwwEhS85Czm2dSROY5fTo2PAPEVdDeppTwGX4= @@ -2102,8 +2102,8 @@ github.com/prometheus/consul_exporter v0.8.0 h1:2z3drFic65WFoHaJRKkmnJRRlBLmmxVq github.com/prometheus/consul_exporter v0.8.0/go.mod h1:KHTgkT1/oLpXKC4+mKZV63hZSMHuKskUnHoenEave4Y= github.com/prometheus/exporter-toolkit v0.7.0/go.mod h1:ZUBIj498ePooX9t/2xtDjeQYwvRpiPP2lh5u4iblj2g= github.com/prometheus/exporter-toolkit v0.7.1/go.mod h1:ZUBIj498ePooX9t/2xtDjeQYwvRpiPP2lh5u4iblj2g= -github.com/prometheus/exporter-toolkit v0.14.0 h1:NMlswfibpcZZ+H0sZBiTjrA3/aBFHkNZqE+iCj5EmRg= -github.com/prometheus/exporter-toolkit v0.14.0/go.mod h1:Gu5LnVvt7Nr/oqTBUC23WILZepW0nffNo10XdhQcwWA= +github.com/prometheus/exporter-toolkit v0.14.1 h1:uKPE4ewweVRWFainwvAcHs3uw15pjw2dk3I7b+aNo9o= +github.com/prometheus/exporter-toolkit v0.14.1/go.mod h1:di7yaAJiaMkcjcz48f/u4yRPwtyuxTU5Jr4EnM2mhtQ= github.com/prometheus/memcached_exporter v0.13.0 h1:d246RYODFCXy39XA8S2PBrqp5jLCSvl9b4KsYspDCHk= github.com/prometheus/memcached_exporter v0.13.0/go.mod h1:fp7Wk6v0RFijeP3Syvd1TShBSJoCG5iFfvPdi5dCMEU= github.com/prometheus/otlptranslator v0.0.0-20250414121140-35db323fe9fb h1:wuS7VydG/rDWTbYMp07paPv3R1hiPC9WgingWs+xgi0= From 635bbe99b8b093d08a451096c1ad4bfb6c369409 Mon Sep 17 00:00:00 2001 From: Cristian Greco Date: Thu, 2 Oct 2025 12:52:09 +0200 Subject: [PATCH 2/4] Review list of collectors in docs --- .../components/prometheus/prometheus.exporter.postgres.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/sources/reference/components/prometheus/prometheus.exporter.postgres.md b/docs/sources/reference/components/prometheus/prometheus.exporter.postgres.md index c02d17ada3..bbb694fae7 100644 --- a/docs/sources/reference/components/prometheus/prometheus.exporter.postgres.md +++ b/docs/sources/reference/components/prometheus/prometheus.exporter.postgres.md @@ -73,6 +73,8 @@ The following collectors are available for selection: * `statio_user_tables` * `wal` * `xlog_location` +* `stat_progress_vacuum` +* `buffercache_summary` {{< /column-list >}} @@ -89,6 +91,8 @@ By default, the following collectors are enabled: * `stat_user_tables` * `statio_user_tables` * `wal` +* `roles` +* `stat_progress_vacuum` {{< /column-list >}} From 70f29b7b9d375cbbccace3859854f4d5e95371b3 Mon Sep 17 00:00:00 2001 From: Cristian Greco Date: Thu, 2 Oct 2025 12:52:36 +0200 Subject: [PATCH 3/4] sort lists --- .../prometheus/prometheus.exporter.postgres.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/sources/reference/components/prometheus/prometheus.exporter.postgres.md b/docs/sources/reference/components/prometheus/prometheus.exporter.postgres.md index bbb694fae7..7d9d4b6224 100644 --- a/docs/sources/reference/components/prometheus/prometheus.exporter.postgres.md +++ b/docs/sources/reference/components/prometheus/prometheus.exporter.postgres.md @@ -54,18 +54,20 @@ The following collectors are available for selection: {{< column-list >}} -* `database` +* `buffercache_summary` * `database_wraparound` +* `database` * `locks` * `long_running_transactions` * `postmaster` * `process_idle` -* `replication` * `replication_slot` +* `replication` * `stat_activity_autovacuum` * `stat_bgwriter` * `stat_checkpointer` - Only supported in PostgreSQL 17 and later * `stat_database` +* `stat_progress_vacuum` * `stat_statements` * `stat_user_tables` * `stat_wal_receiver` @@ -73,8 +75,6 @@ The following collectors are available for selection: * `statio_user_tables` * `wal` * `xlog_location` -* `stat_progress_vacuum` -* `buffercache_summary` {{< /column-list >}} @@ -84,15 +84,15 @@ By default, the following collectors are enabled: * `database` * `locks` -* `replication` * `replication_slot` +* `replication` +* `roles` * `stat_bgwriter` * `stat_database` +* `stat_progress_vacuum` * `stat_user_tables` * `statio_user_tables` * `wal` -* `roles` -* `stat_progress_vacuum` {{< /column-list >}} From 4484c86a5e76b4350017aaf9df7f956be2cb22b9 Mon Sep 17 00:00:00 2001 From: Cristian Greco Date: Thu, 2 Oct 2025 12:54:59 +0200 Subject: [PATCH 4/4] address feedback --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f57e00ad7..4c08d003e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,8 +34,8 @@ Main (unreleased) - Reduce memory overhead of `prometheus.remote_write`'s WAL by lowering the size of the allocated series storage. (@kgeckhart) - Reduce lock wait/contention on the labelstore.LabelStore by removing unecessary usage from `prometheus.relabel`. (@kgeckhart) -- `prometheus.exporter.postgres` dependency has been updated to v0.18.1. (@cristiangreco) - - This includes new `stat_progress_vacuum` and `buffercache_summary` collectors, as well as other bugfixes and enhancements. + +- `prometheus.exporter.postgres` dependency has been updated to v0.18.1. This includes new `stat_progress_vacuum` and `buffercache_summary` collectors, as well as other bugfixes and enhancements. (@cristiangreco) ### Bugfixes