]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/nominatim/recipes/default.rb
consolidate settings for nominatim machines
[chef.git] / cookbooks / nominatim / recipes / default.rb
index 93aa75c1c9ca34c65caecb76c21d42b31ee6c630..571c8fd321f2383ca59232aec885b0b9c32079f1 100644 (file)
@@ -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"]
@@ -165,6 +166,9 @@ package %w[
   php-pgsql
   php-intl
   php-symfony-dotenv
+  ruby
+  ruby-file-tail
+  ruby-pg
 ]
 
 source_directory = "#{basedir}/nominatim"
@@ -334,7 +338,7 @@ else
   end
 
   service "nominatim-update-maintenance-trigger" do
-    action [:enable, :start]
+    action [:enable]
   end
 end
 
@@ -455,6 +459,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"