projects
/
chef.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
e7b5cf7
)
Manage all ethernet interfaces for munin, regardless of name
author
Tom Hughes
<tom@compton.nu>
Thu, 29 Jan 2015 20:46:04 +0000
(20:46 +0000)
committer
Tom Hughes
<tom@compton.nu>
Thu, 29 Jan 2015 20:48:04 +0000
(20:48 +0000)
cookbooks/munin/recipes/default.rb
patch
|
blob
|
history
diff --git
a/cookbooks/munin/recipes/default.rb
b/cookbooks/munin/recipes/default.rb
index 847425e539f4aed4b430322cb4a122d0158ba918..ac6c4d843558183e7bfba4de5fcd914a09ffbad2 100644
(file)
--- 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|
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
end
end
end