From: Tom Hughes Date: Tue, 22 Sep 2020 16:42:13 +0000 (+0000) Subject: Add nginx exporter X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/87655058a50a160829441281f58f5a78441302f4?ds=sidebyside Add nginx exporter --- diff --git a/cookbooks/nginx/metadata.rb b/cookbooks/nginx/metadata.rb index dc7758e3a..cd321f6da 100644 --- a/cookbooks/nginx/metadata.rb +++ b/cookbooks/nginx/metadata.rb @@ -9,4 +9,5 @@ supports "ubuntu" depends "apt" depends "munin" depends "networking" +depends "prometheus" depends "ssl" diff --git a/cookbooks/nginx/recipes/default.rb b/cookbooks/nginx/recipes/default.rb index 20128a1cb..1cc5e5b46 100644 --- a/cookbooks/nginx/recipes/default.rb +++ b/cookbooks/nginx/recipes/default.rb @@ -19,6 +19,7 @@ include_recipe "apt" include_recipe "munin" +include_recipe "prometheus" include_recipe "ssl" package "nginx" @@ -61,6 +62,10 @@ package "libwww-perl" munin_plugin "nginx_request" munin_plugin "nginx_status" +prometheus_exporter "nginx" do + port 9113 +end + template "/usr/local/bin/nginx-old-cache-cleanup" do source "nginx-old-cache-cleanup.erb" owner "root"