From 1613ad2ccaf85558a7fdcc3021992ad4d1734fc2 Mon Sep 17 00:00:00 2001 From: Grant Slater Date: Tue, 25 Mar 2014 10:49:55 +0000 Subject: [PATCH 1/1] Disable faulty ACPI power sensor on specific HP systems --- cookbooks/munin/recipes/default.rb | 12 ++++++++++++ .../default/disable-bad-acpi-sensor.conf.erb | 3 +++ 2 files changed, 15 insertions(+) create mode 100644 cookbooks/munin/templates/default/disable-bad-acpi-sensor.conf.erb diff --git a/cookbooks/munin/recipes/default.rb b/cookbooks/munin/recipes/default.rb index 4bf1f8703..f02730ebc 100644 --- a/cookbooks/munin/recipes/default.rb +++ b/cookbooks/munin/recipes/default.rb @@ -76,6 +76,18 @@ remote_directory "/etc/munin/plugin-conf.d" do notifies :restart, "service[munin-node]" end +if node[:dmi] and node[:dmi][:system] and node[:dmi][:system][:manufacturer] == "HP" + case node[:dmi][:system][:product_name] + when "ProLiant DL360 G6", "ProLiant DL360 G7" + template "/etc/sensors.d/disable-bad-acpi-sensor.conf" do + source "disable-bad-acpi-sensor.conf.erb" + owner "root" + group "root" + mode 0644 + end + end +end + if Dir.glob("/proc/acpi/thermal_zone/*/temperature").empty? munin_plugin "acpi" do action :delete diff --git a/cookbooks/munin/templates/default/disable-bad-acpi-sensor.conf.erb b/cookbooks/munin/templates/default/disable-bad-acpi-sensor.conf.erb new file mode 100644 index 000000000..58c1062ec --- /dev/null +++ b/cookbooks/munin/templates/default/disable-bad-acpi-sensor.conf.erb @@ -0,0 +1,3 @@ +# DO NOT EDIT - This file is being maintained by Chef +chip "power_meter-*" + ignore power1 -- 2.39.5