From: Tom Hughes Date: Fri, 24 Feb 2023 14:03:24 +0000 (+0000) Subject: Monitor battery/capacitor status for HP RAID controller X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/472282097a4de1cba8ab7e52a3da644e752e723b Monitor battery/capacitor status for HP RAID controller --- diff --git a/cookbooks/hardware/templates/default/ohai.rb.erb b/cookbooks/hardware/templates/default/ohai.rb.erb index b6064b384..a2eb0ef96 100644 --- a/cookbooks/hardware/templates/default/ohai.rb.erb +++ b/cookbooks/hardware/templates/default/ohai.rb.erb @@ -331,6 +331,7 @@ Ohai.plugin(:Hardware) do when "Hardware Revision" then controller[:hardware_version] = Regexp.last_match(2) when "Firmware Version" then controller[:firmware_version] = Regexp.last_match(2) when "PCI Address (Domain:Bus:Device.Function)" then controller[:pci_slot] = Regexp.last_match(2) + when "Battery/Capacitor Status" then controller[:battery_status] = Regexp.last_match(2).split.first.downcase end elsif controller && line =~ /^ Logical Drive: (\d+)$/ array = {