From: Tom Hughes Date: Sat, 16 Feb 2019 12:45:46 +0000 (+0000) Subject: Monitor all interfaces that are up and aren't the loopback interface X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/f7fbb241bda54acc8179bef7d05e93a58b81093c?ds=sidebyside Monitor all interfaces that are up and aren't the loopback interface --- diff --git a/cookbooks/munin/recipes/default.rb b/cookbooks/munin/recipes/default.rb index 677a62b32..df7bfbe08 100644 --- a/cookbooks/munin/recipes/default.rb +++ b/cookbooks/munin/recipes/default.rb @@ -160,7 +160,7 @@ munin_plugin "http_loadtime" do end node[:network][:interfaces].each do |ifname, ifattr| - if ifattr[:encapsulation] == "Ethernet" && ifattr[:state] == "up" + if ifattr[:flags].include?("UP") && !ifattr[:flags].include?("LOOPBACK") if node[:hardware] && node[:hardware][:network] && node[:hardware][:network][ifname][:device] =~ /^virtio/