From b5b025beaf095afbe4b53005c6f308e44c4af3eb Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Fri, 15 Mar 2019 16:26:30 +0000 Subject: [PATCH] Avoid exception when an interface has no flags --- cookbooks/munin/recipes/default.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbooks/munin/recipes/default.rb b/cookbooks/munin/recipes/default.rb index df7bfbe08..3418d3e83 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[:flags].include?("UP") && !ifattr[:flags].include?("LOOPBACK") + if ifattr[:flags]&.include?("UP") && !ifattr[:flags].include?("LOOPBACK") if node[:hardware] && node[:hardware][:network] && node[:hardware][:network][ifname][:device] =~ /^virtio/ -- 2.43.2