From 2c47ce1f262afebbb0ace3b7d0cd0c19f5ce4739 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sun, 4 Oct 2020 21:02:25 +0100 Subject: [PATCH] Exclude postgres and template databases from prometheus --- cookbooks/postgresql/recipes/default.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cookbooks/postgresql/recipes/default.rb b/cookbooks/postgresql/recipes/default.rb index 0e29b2042..4d7aec10e 100644 --- a/cookbooks/postgresql/recipes/default.rb +++ b/cookbooks/postgresql/recipes/default.rb @@ -161,5 +161,6 @@ end prometheus_exporter "postgres" do port 9187 user "postgres" - environment "DATA_SOURCE_NAME" => "user=postgres host=/run/postgresql #{ports.join(',')}" + environment "DATA_SOURCE_NAME" => "user=postgres host=/run/postgresql #{ports.join(',')}", + "PG_EXPORTER_EXCLUDE_DATABASES" => "postgres,template0,template1" end -- 2.43.2