]> git.openstreetmap.org Git - chef.git/commitdiff
Configure munin monitoring of IPMI sensors
authorTom Hughes <tom@compton.nu>
Fri, 31 May 2013 18:18:07 +0000 (19:18 +0100)
committerTom Hughes <tom@compton.nu>
Fri, 31 May 2013 18:18:07 +0000 (19:18 +0100)
cookbooks/munin/recipes/default.rb

index 51020994c8fcff0f3a52d2134ea1fb60cf895717..c3e43cdd8eed5f4ed6b9a573dafc5c6cebe7ea7e 100644 (file)
@@ -166,7 +166,25 @@ end
 munin_plugin "interrupts"
 munin_plugin "iostat"
 munin_plugin "iostat_ios"
-# ipmi_
+
+if Dir.glob("/dev/ipmi*").empty?
+  munin_plugin "ipmi_fans" do
+    action :delete
+  end
+
+  munin_plugin "ipmi_temp" do
+    action :delete
+  end
+else
+  munin_plugin "ipmi_fans" do
+    target "ipmi_"
+  end
+
+  munin_plugin "ipmi_temp" do
+    target "ipmi_"
+  end
+end
+
 munin_plugin "irqstats"
 
 Dir.new("/sys/block").each do |device|