]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/hardware/recipes/default.rb
Enable SNMP monitoring for iWay machines
[chef.git] / cookbooks / hardware / recipes / default.rb
index f2af6c9863af0365a1ec0081777f1c670da4ba7c..180c74b8b5880da2434e9089f169a9f1a0fb1c9c 100644 (file)
@@ -351,7 +351,7 @@ if !intel_ssds.empty? || !intel_nvmes.empty?
 end
 
 disks = disks.map do |disk|
-  next if disk[:state] == "spun_down"
+  next if disk[:state] == "spun_down" || %w[unconfigured failed].any?(disk[:status])
 
   if disk[:smart_device]
     controller = node[:hardware][:disk][:controllers][disk[:controller]]
@@ -460,6 +460,7 @@ plugins = Dir.glob("/etc/munin/plugins/smart_*").map { |p| File.basename(p) } -
 plugins.each do |plugin|
   munin_plugin plugin do
     action :delete
+    conf "munin.smart.erb"
   end
 end