From 21d8546309a92b2eba0c7ff2a71aca7f22e7d6d9 Mon Sep 17 00:00:00 2001 From: Joshua Kuestersteffen Date: Fri, 21 Jul 2023 14:09:17 -0500 Subject: [PATCH] feat: disable all non-custom postgres metrics --- .../postgres/docker-compose.postgres-exporter.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/exporters/postgres/docker-compose.postgres-exporter.yml b/exporters/postgres/docker-compose.postgres-exporter.yml index 433f717..aa8098f 100644 --- a/exporters/postgres/docker-compose.postgres-exporter.yml +++ b/exporters/postgres/docker-compose.postgres-exporter.yml @@ -9,8 +9,19 @@ services: image: prometheuscommunity/postgres-exporter:${POSTGRES_EXPORTER_VERSION:-latest} command: - '--config.file=/etc/postgres-exporter/postgres_exporter.yml' - # disables the collection of logical replication metrics to keep the exporter working with Postgres 9.6 (https://github.com/medic/cht-watchdog/issues/55) + # disables the collection of all metrics except for custom queries (https://github.com/medic/cht-watchdog/issues/70) + - '--no-collector.database' + - '--no-collector.postmaster' + - '--no-collector.process_idle' + - '--no-collector.replication' - '--no-collector.replication_slot' + - '--no-collector.stat_bgwriter' + - '--no-collector.stat_database' + - '--no-collector.statio_user_tables' + - '--no-collector.stat_statements' + - '--no-collector.stat_user_tables' + - '--disable-default-metrics' + - '--disable-settings-metrics' environment: - PG_EXPORTER_EXTEND_QUERY_PATH=/etc/postgres-exporter/queries.yml volumes: