X-Git-Url: https://git.openstreetmap.org/chef.git/blobdiff_plain/f4e4d77e318f2130d2f410d118a5bd720ece3bbd..45479cd73476809c38704ab5f221c16c86504f2f:/cookbooks/munin/recipes/default.rb diff --git a/cookbooks/munin/recipes/default.rb b/cookbooks/munin/recipes/default.rb index 677d79d5e..fb9807931 100644 --- a/cookbooks/munin/recipes/default.rb +++ b/cookbooks/munin/recipes/default.rb @@ -162,6 +162,17 @@ end node[:network][:interfaces].each do |ifname, ifattr| if ifattr[:encapsulation] == "Ethernet" && ifattr[:state] == "up" + if 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 + munin_plugin "if_err_#{ifname}" do target "if_err_" end