Don't include smart error logs in munin checks
authorTom Hughes <tom@compton.nu>
Fri, 25 Jul 2014 23:02:39 +0000 (00:02 +0100)
committerTom Hughes <tom@compton.nu>
Fri, 25 Jul 2014 23:08:15 +0000 (00:08 +0100)
cookbooks/munin/recipes/default.rb
cookbooks/munin/templates/default/smart.erb [new file with mode: 0644]

index 03bcee613c92ca4202594a956e56b45b41890869..847425e539f4aed4b430322cb4a122d0158ba918 100644 (file)
@@ -325,6 +325,8 @@ node[:block_device].each do |name,attributes|
   if attributes[:vendor] == "ATA"
     munin_plugin "smart_#{name}" do
       target "smart_"
+      conf "smart.erb"
+      conf_variables :disk => name
     end
   else
     munin_plugin "smart_#{name}" do
diff --git a/cookbooks/munin/templates/default/smart.erb b/cookbooks/munin/templates/default/smart.erb
new file mode 100644 (file)
index 0000000..bcb813a
--- /dev/null
@@ -0,0 +1,4 @@
+# DO NOT EDIT - This file is being maintained by Chef
+
+[smart_<%= @disk %>]
+env.smartargs -H