]> git.openstreetmap.org Git - chef.git/commitdiff
Add prometheus exporter for nominatim
authorTom Hughes <tom@compton.nu>
Tue, 23 Nov 2021 18:29:34 +0000 (18:29 +0000)
committerTom Hughes <tom@compton.nu>
Tue, 23 Nov 2021 18:29:34 +0000 (18:29 +0000)
cookbooks/nominatim/metadata.rb
cookbooks/nominatim/recipes/default.rb

index de51c87ca7feb78700a9cb5be27b2ab88dee772c..3c8903ef39c2b467fa634b20986203eaa53461c2 100644 (file)
@@ -13,5 +13,6 @@ depends           "munin"
 depends           "nginx"
 depends           "php"
 depends           "postgresql"
+depends           "prometheus"
 depends           "python"
 depends           "systemd"
index 7a9e9f163e006dc2e20d5da0ff28eccac8c9234e..2285cee73c42e3d79c56f13114aa54f1d689cd65 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"]
@@ -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"