]> git.openstreetmap.org Git - chef.git/blob - cookbooks/apache/templates/default/apache.prom.erb
apache: use 429 error for mod-evasive
[chef.git] / cookbooks / apache / templates / default / apache.prom.erb
1 # HELP apache_server_limit Value of ServerLimit directive
2 # TYPE apache_server_limit gauge
3 <% if node[:apache][:mpm] == "prefork" -%>
4 apache_server_limit{} <%= node[:apache][:prefork][:server_limit] || 256 %>
5 <% elsif node[:apache][:mpm] == "worker" -%>
6 apache_server_limit{} <%= node[:apache][:worker][:server_limit] || 16 %>
7 <% elsif node[:apache][:mpm] == "event" -%>
8 apache_server_limit{} <%= node[:apache][:event][:server_limit] || 16 %>
9 <% end -%>
10 # HELP apache_threads_per_child Value of ThreadsPerChild directive
11 # TYPE apache_threads_per_child gauge
12 <% if node[:apache][:mpm] == "prefork" -%>
13 apache_threads_per_child{} 1
14 <% elsif node[:apache][:mpm] == "worker" -%>
15 apache_threads_per_child{} <%= node[:apache][:worker][:threads_per_child] || 25 %>
16 <% elsif node[:apache][:mpm] == "event" -%>
17 apache_threads_per_child{} <%= node[:apache][:event][:threads_per_child] || 25 %>
18 <% end -%>
19 # HELP apache_async_request_worker_factor Value of AsyncRequestWorkerFactor directive
20 # TYPE apache_async_request_worker_factor gauge
21 <% if node[:apache][:mpm] == "prefork" -%>
22 apache_async_request_worker_factor{} 0
23 <% elsif node[:apache][:mpm] == "worker" -%>
24 apache_async_request_worker_factor{} 0
25 <% elsif node[:apache][:mpm] == "event" -%>
26 apache_async_request_worker_factor{} <%= node[:apache][:event][:async_request_worker_factor] || 2 %>
27 <% end -%>