From: Tom Hughes Date: Mon, 12 Dec 2016 11:17:49 +0000 (+0000) Subject: Replace full stops in interface names for compound munin graphs X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/6f937ded3a56fe96431490cd92ad18dc19dda371?ds=inline Replace full stops in interface names for compound munin graphs --- diff --git a/cookbooks/munin/recipes/server.rb b/cookbooks/munin/recipes/server.rb index dcff86860..a03b7d684 100644 --- a/cookbooks/munin/recipes/server.rb +++ b/cookbooks/munin/recipes/server.rb @@ -49,13 +49,13 @@ clients = search(:node, "recipes:munin\\:\\:default").sort_by { |n| n[:hostname] frontends = search(:node, "recipes:web\\:\\:frontend").reject { |n| Time.now - Time.at(n[:ohai_time]) > expiry_time }.map { |n| n[:hostname] }.sort # ~FC010 backends = search(:node, "recipes:web\\:\\:backend").reject { |n| Time.now - Time.at(n[:ohai_time]) > expiry_time }.map { |n| n[:hostname] }.sort # ~FC010 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] } + { :name => n[:hostname], :interface => n.interfaces(:role => :external).first[:interface].tr(".", "_") } 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] } + { :name => n[:hostname], :interface => n.interfaces(:role => :external).first[:interface].tr(".", "_") } end geocoders = search(:node, "roles:nominatim").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] } + { :name => n[:hostname], :interface => n.interfaces(:role => :external).first[:interface].tr(".", "_") } end template "/etc/munin/munin.conf" do