From 68899dc3eb3968b2008717146f7ff9e061bb00f3 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Fri, 28 Oct 2016 12:52:44 +0200 Subject: [PATCH] Alternative temp label for smartctl --- zabbix_scripts/util_generate_sensors_ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zabbix_scripts/util_generate_sensors_ini b/zabbix_scripts/util_generate_sensors_ini index 5b2c37a..fefbeaf 100755 --- a/zabbix_scripts/util_generate_sensors_ini +++ b/zabbix_scripts/util_generate_sensors_ini @@ -285,7 +285,7 @@ if ($smartctl && -x $smartctl){ my @lines = qx($smartctl -A /dev/$block); next if ($? != 0); foreach my $l (@lines){ - if ($l =~ /Temperature_Celsius/){ + if ($l =~ /Temperature_Celsius|Airflow_Temperature_Cel/){ $sensors->{$block} = { description => "$block temperature", threshold_low => $def_hd_temp_thres_high-$temp_hd_hyst, @@ -318,7 +318,7 @@ if ($smartctl && -x $smartctl){ print "Found a temperature sensor using smartctl (megaraid): sda-$i\n"; last; } - elsif ($l =~ /Temperature_Celsius/){ + elsif ($l =~ /Temperature_Celsius|Airflow_Temperature_Cel/){ $sensors->{'sda-' . $i} = { description => "Temperature for disk No $i on sda", threshold_low => $def_hd_temp_thres_high-$temp_hd_hyst,