From: Tom Hughes Date: Thu, 29 Aug 2013 18:27:41 +0000 (+0100) Subject: Add some basic compound graphs for the render servers X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/22d1a5167241df3a92df69672950e599c8d7d817 Add some basic compound graphs for the render servers --- diff --git a/cookbooks/munin/recipes/server.rb b/cookbooks/munin/recipes/server.rb index 1e51b4c4a..ed7aeac44 100644 --- a/cookbooks/munin/recipes/server.rb +++ b/cookbooks/munin/recipes/server.rb @@ -29,13 +29,16 @@ backends = search(:node, "recipes:web\\:\\:backend").reject { |n| Time.now - Tim tilecaches = search(:node, "roles:tilecache").reject { |n| Time.now - Time.at(n[:ohai_time]) > expiry_time }.sort_by { |n| n[:hostname] }.map do |n| { :name => n[:hostname], :interface => n.interfaces(:role => :external).first[:interface] } end +renderers = search(:node, "roles:tile").reject { |n| Time.now - Time.at(n[:ohai_time]) > expiry_time }.sort_by { |n| n[:hostname] }.map do |n| + { :name => n[:hostname], :interface => n.interfaces(:role => :external).first[:interface] } +end template "/etc/munin/munin.conf" do source "munin.conf.erb" owner "root" group "root" mode 0644 - variables :expiry_time => expiry_time, :clients => clients, :frontends => frontends, :backends => backends, :tilecaches => tilecaches + variables :expiry_time => expiry_time, :clients => clients, :frontends => frontends, :backends => backends, :tilecaches => tilecaches, :renderers => renderers end apache_site "munin.openstreetmap.org" do diff --git a/cookbooks/munin/templates/default/munin.conf.erb b/cookbooks/munin/templates/default/munin.conf.erb index 16205df69..82ffb6dab 100644 --- a/cookbooks/munin/templates/default/munin.conf.erb +++ b/cookbooks/munin/templates/default/munin.conf.erb @@ -336,3 +336,45 @@ unknown_limit 144 <% @tilecaches.each do |tc| -%> squid_times_dnsl.<%= tc[:name] %>.label <%= tc[:name] %> <% end -%> + +# Configure compound graphs for render.openstreetmap.org +[render.openstreetmap] + update no + apache_accesses.graph_title Apache accesses + apache_accesses.graph_vlabel accesses / ${graph_period} + apache_accesses.graph_category apache + apache_accesses.graph_order <%= Chef::Munin.expand "%%name%%=%%name%%.openstreetmap:apache_accesses.accesses80", @renderers %> + apache_accesses.graph_total total +<% @renderers.each do |rs| -%> + apache_accesses.<%= rs[:name] %>.label <%= rs[:name] %> + apache_accesses.<%= rs[:name] %>.draw AREASTACK +<% end -%> + apache_volume.graph_title Apache volume + apache_volume.graph_vlabel bytes per ${graph_period} + apache_volume.graph_category apache + apache_volume.graph_order <%= Chef::Munin.expand "%%name%%=%%name%%.openstreetmap:apache_volume.volume80", @renderers %> + apache_volume.graph_total total +<% @renderers.each do |rs| -%> + apache_volume.<%= rs[:name] %>.label <%= rs[:name] %> + apache_volume.<%= rs[:name] %>.draw AREASTACK +<% end -%> + network_in.graph_title Inbound network traffic + network_in.graph_vlabel bits in per ${graph_period} + network_in.graph_category network + network_in.graph_order <%= Chef::Munin.expand "%%name%%=%%name%%.openstreetmap:if_%%interface%%.down", @renderers %> + network_in.graph_total total +<% @renderers.each do |rs| -%> + network_in.<%= rs[:name] %>.label <%= rs[:name] %> + network_in.<%= rs[:name] %>.cdef <%= rs[:name] %>,8,* + network_in.<%= rs[:name] %>.draw AREASTACK +<% end -%> + network_out.graph_title Outbound network traffic + network_out.graph_vlabel bits out per ${graph_period} + network_out.graph_category network + network_out.graph_order <%= Chef::Munin.expand "%%name%%=%%name%%.openstreetmap:if_%%interface%%.up", @renderers %> + network_out.graph_total total +<% @renderers.each do |rs| -%> + network_out.<%= rs[:name] %>.label <%= rs[:name] %> + network_out.<%= rs[:name] %>.cdef <%= rs[:name] %>,8,* + network_out.<%= rs[:name] %>.draw AREASTACK +<% end -%>