From 7a84671ba2dc615de3f49f3ee6cd9efd04eb55bc Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Tue, 21 Jan 2014 23:01:48 +0000 Subject: [PATCH 1/1] Configure SMART attribute monitoring for direct attached SATA disks --- cookbooks/munin/recipes/default.rb | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/cookbooks/munin/recipes/default.rb b/cookbooks/munin/recipes/default.rb index 3a5be0d61..ce771e8c8 100644 --- a/cookbooks/munin/recipes/default.rb +++ b/cookbooks/munin/recipes/default.rb @@ -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" -- 2.43.2