]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/apache/recipes/default.rb
Enable mod_evasive for all apache instances except render servers
[chef.git] / cookbooks / apache / recipes / default.rb
index f47d500b5163c60bd240491334ceafaa89f42866..aee5dfcc87564b74dfdb9bbc624a04e1a10c583b 100644 (file)
@@ -78,6 +78,11 @@ apache_module "status" do
   variables :hosts => admins["hosts"]
 end
 
+apache_module "evasive" do
+  conf "evasive.conf.erb"
+  only_if { node[:apache][:evasive] }
+end
+
 apache_module "brotli" do
   conf "brotli.conf.erb"
 end
@@ -97,6 +102,13 @@ munin_plugin "apache_accesses"
 munin_plugin "apache_processes"
 munin_plugin "apache_volume"
 
+template "/var/lib/prometheus/node-exporter/apache.prom" do
+  source "apache.prom.erb"
+  owner "root"
+  group "root"
+  mode "644"
+end
+
 prometheus_exporter "apache" do
   port 9117
   options "--scrape_uri=http://localhost/server-status?auto"