]> git.openstreetmap.org Git - chef.git/commitdiff
Exclude postgres and template databases from prometheus
authorTom Hughes <tom@compton.nu>
Sun, 4 Oct 2020 20:02:25 +0000 (21:02 +0100)
committerTom Hughes <tom@compton.nu>
Sun, 4 Oct 2020 20:02:25 +0000 (21:02 +0100)
cookbooks/postgresql/recipes/default.rb

index 0e29b2042dcef2a34c3717283e1f52a947cb624f..4d7aec10e7b36092ab800a9567044c8ffe1f0dea 100644 (file)
@@ -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