X-Git-Url: https://git.openstreetmap.org/chef.git/blobdiff_plain/a585c97b901ea250d40f2d924d1a8ac5949751a4..2bce87624a95eeebc027ee8f3eed5fda8c47bba9:/cookbooks/munin/recipes/default.rb diff --git a/cookbooks/munin/recipes/default.rb b/cookbooks/munin/recipes/default.rb index 3a5be0d61..e83cac6f6 100644 --- a/cookbooks/munin/recipes/default.rb +++ b/cookbooks/munin/recipes/default.rb @@ -188,23 +188,6 @@ else end munin_plugin "irqstats" - -Dir.new("/sys/block").each do |device| - if device.match(/^sd/) - munin_plugin "linux_diskstat_iops_#{device}" do - target "linux_diskstat_" - end - - munin_plugin "linux_diskstat_latency_#{device}" do - target "linux_diskstat_" - end - - munin_plugin "linux_diskstat_throughput_#{device}" do - target "linux_diskstat_" - end - end -end - munin_plugin "load" munin_plugin "memory" munin_plugin "netstat" @@ -288,7 +271,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"