+ if ifattr[:flags]&.include?("UP") && !ifattr[:flags].include?("LOOPBACK")
+ if node[:hardware] &&
+ node[:hardware][:network] &&
+ node[:hardware][:network][ifname][:device] =~ /^virtio/
+ munin_plugin_conf "if_#{ifname}" do
+ template "if.erb"
+ variables :ifname => ifname
+ end
+ else
+ munin_plugin_conf "if_#{ifname}" do
+ action :delete
+ end
+ end
+