]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/apache/recipes/default.rb
Report selected apache configuration options to prometheus
[chef.git] / cookbooks / apache / recipes / default.rb
index b1e80892908bbed6ab8a9222bc0784afd55c1f67..4d91da140e061d30389de52992b3edcc801bcf48 100644 (file)
@@ -54,6 +54,13 @@ template "/etc/apache2/ports.conf" do
   mode "644"
 end
 
+systemd_service "apache2" do
+  dropin "chef"
+  memory_high "50%"
+  memory_max "75%"
+  notifies :restart, "service[apache2]"
+end
+
 service "apache2" do
   action [:enable, :start]
   retries 2
@@ -90,8 +97,14 @@ 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
-  listen_switch "telemetry.address"
   options "--scrape_uri=http://localhost/server-status?auto"
 end