From: Tom Hughes Date: Tue, 23 Nov 2021 18:29:34 +0000 (+0000) Subject: Add prometheus exporter for nominatim X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/be386c1df0de49e95aaf235927d5f0cc2d7a9bb0 Add prometheus exporter for nominatim --- diff --git a/cookbooks/nominatim/metadata.rb b/cookbooks/nominatim/metadata.rb index de51c87ca..3c8903ef3 100644 --- a/cookbooks/nominatim/metadata.rb +++ b/cookbooks/nominatim/metadata.rb @@ -13,5 +13,6 @@ depends "munin" depends "nginx" depends "php" depends "postgresql" +depends "prometheus" depends "python" depends "systemd" diff --git a/cookbooks/nominatim/recipes/default.rb b/cookbooks/nominatim/recipes/default.rb index 7a9e9f163..2285cee73 100644 --- a/cookbooks/nominatim/recipes/default.rb +++ b/cookbooks/nominatim/recipes/default.rb @@ -20,6 +20,7 @@ include_recipe "accounts" include_recipe "munin" include_recipe "php::fpm" +include_recipe "prometheus" basedir = data_bag_item("accounts", "nominatim")["home"] email_errors = data_bag_item("accounts", "lonvia")["email"] @@ -455,6 +456,15 @@ munin_plugin "nominatim_requests" do target "#{source_directory}/munin/nominatim_requests_querylog" end +prometheus_exporter "nominatim" do + port 8082 + user "www-data" + options [ + "--nominatim.query-log=#{node[:nominatim][:logdir]}/query.log", + "--nominatim.database-name=#{node[:nominatim][:dbname]}" + ] +end + directory "#{basedir}/status" do owner "nominatim" group "postgres"