X-Git-Url: https://git.openstreetmap.org/chef.git/blobdiff_plain/261e7e9cd1a9882faa4ed7087b5902ebafe25988..7a84671ba2dc615de3f49f3ee6cd9efd04eb55bc:/cookbooks/munin/recipes/default.rb?ds=sidebyside diff --git a/cookbooks/munin/recipes/default.rb b/cookbooks/munin/recipes/default.rb index 33f51097e..ce771e8c8 100644 --- a/cookbooks/munin/recipes/default.rb +++ b/cookbooks/munin/recipes/default.rb @@ -116,7 +116,7 @@ else end end -if %x{sysctl -n net.ipv4.ip_forward}.chomp == "1" +if File.read("/proc/sys/net/ipv4/ip_forward").chomp == "1" munin_plugin "fw_packets" else munin_plugin "fw_packets" do @@ -288,7 +288,18 @@ else end end -# smart_ +node[:block_device].each do |name,attributes| + if attributes[:vendor] == "ATA" + munin_plugin "smart_#{name}" do + target "smart_" + end + else + munin_plugin "smart_#{name}" do + action :delete + end + end +end + munin_plugin "swap" munin_plugin "threads" munin_plugin "uptime"