X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/2bfb0ef07fb64314f5c4ded641a8c280df9c1d0b..066c0bfda604f2a662fa1d4b1b5942fc598a05a4:/cookbooks/postgresql/recipes/default.rb?ds=sidebyside diff --git a/cookbooks/postgresql/recipes/default.rb b/cookbooks/postgresql/recipes/default.rb index b5e7be908..a57e1b348 100644 --- a/cookbooks/postgresql/recipes/default.rb +++ b/cookbooks/postgresql/recipes/default.rb @@ -17,7 +17,7 @@ # limitations under the License. # -include_recipe "apt" +include_recipe "apt::postgresql" include_recipe "munin" include_recipe "prometheus" @@ -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