]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/postgresql/recipes/default.rb
Improve sandboxing of prometheus collectors
[chef.git] / cookbooks / postgresql / recipes / default.rb
index a17b38084d12227a533f8a07fda4ec28d32de27d..a57e1b3481f3918d011342bcc559940ce5cba9d6 100644 (file)
@@ -174,10 +174,13 @@ end
 
 prometheus_exporter "postgres" do
   port 9187
+  scrape_interval "1m"
+  scrape_timeout "1m"
   user "postgres"
   options "--extend.query-path=/etc/prometheus/exporters/postgres_queries.yml"
   environment "DATA_SOURCE_URI" => uris.sort.uniq.first,
               "PG_EXPORTER_AUTO_DISCOVER_DATABASES" => "true",
               "PG_EXPORTER_EXCLUDE_DATABASES" => "postgres,template0,template1"
+  restrict_address_families "AF_UNIX"
   subscribes :restart, "template[/etc/prometheus/exporters/postgres_queries.yml]"
 end