From 81e5f414c8986634ec5b50a722af433a4411180a Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Wed, 6 Apr 2016 13:52:41 +0200 Subject: [PATCH] Detect HDD temp sensors with sat+megaraid --- zabbix_scripts/util_generate_sensors_ini | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/zabbix_scripts/util_generate_sensors_ini b/zabbix_scripts/util_generate_sensors_ini index 13e8c2a..1840c09 100755 --- a/zabbix_scripts/util_generate_sensors_ini +++ b/zabbix_scripts/util_generate_sensors_ini @@ -271,6 +271,18 @@ if ($smartctl && -x $smartctl){ print "Found a temperature sensor using smartctl (megaraid): sda-$i\n"; last; } + elsif ($l =~ /Temperature_Celsius/){ + $sensors->{'sda-' . $i} = { + description => "Temperature for disk No $i on sda", + threshold_low => $def_hd_temp_thres_high-$temp_hd_hyst, + threshold_high => $def_hd_temp_thres_high, + type => 'temp', + unit => '°C', + cmd => "$smartctl -A -d megaraid,$i /dev/sda | grep Temperature_Celsius | awk '{print \$10}'" + }; + print "Found a temperature sensor using smartctl (megaraid): sda-$i\n"; + last; + } } } }