From 6f937ded3a56fe96431490cd92ad18dc19dda371 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Mon, 12 Dec 2016 11:17:49 +0000 Subject: [PATCH] Replace full stops in interface names for compound munin graphs --- cookbooks/munin/recipes/server.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 -- 2.39.5