X-Git-Url: https://git.openstreetmap.org/chef.git/blobdiff_plain/e7b5cf7658e1205959525d346af72c7720c7e95c..41140b569c7401130afc08c91554e57688ef9b91:/cookbooks/munin/recipes/default.rb?ds=sidebyside diff --git a/cookbooks/munin/recipes/default.rb b/cookbooks/munin/recipes/default.rb index 847425e53..ac6c4d843 100644 --- a/cookbooks/munin/recipes/default.rb +++ b/cookbooks/munin/recipes/default.rb @@ -173,23 +173,21 @@ munin_plugin "http_loadtime" do end node[:network][:interfaces].each do |ifname,ifattr| - if ifname =~ /^eth\d+$/ - if ifattr[:flags] and ifattr[:flags].include?("UP") - munin_plugin "if_err_#{ifname}" do - target "if_err_" - end + if ifattr[:encapsulation] == "Ethernet" and ifattr[:state] == "up" + munin_plugin "if_err_#{ifname}" do + target "if_err_" + end - munin_plugin "if_#{ifname}" do - target "if_" - end - else - munin_plugin "if_err_#{ifname}" do - action :delete - end + munin_plugin "if_#{ifname}" do + target "if_" + end + else + munin_plugin "if_err_#{ifname}" do + action :delete + end - munin_plugin "if_#{ifname}" do - action :delete - end + munin_plugin "if_#{ifname}" do + action :delete end end end