]> git.openstreetmap.org Git - chef.git/commitdiff
Configure SMART attribute monitoring for direct attached SATA disks
authorTom Hughes <tom@compton.nu>
Tue, 21 Jan 2014 23:01:48 +0000 (23:01 +0000)
committerTom Hughes <tom@compton.nu>
Tue, 21 Jan 2014 23:01:48 +0000 (23:01 +0000)
cookbooks/munin/recipes/default.rb

index 3a5be0d61513b92a9b7a0cdae4e1b1c488318095..ce771e8c8cc29e8318715e29c5254e7560932214 100644 (file)
@@ -288,7 +288,18 @@ else
   end
 end
 
   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"
 munin_plugin "swap"
 munin_plugin "threads"
 munin_plugin "uptime"