Alternative temp label for smartctl

tags/zabbix-agent-addons-0.2.20-1 0.2.12_el5
Daniel Berteaud 8 years ago
parent 71cf068d67
commit 68899dc3eb
  1. 4
      zabbix_scripts/util_generate_sensors_ini

@ -285,7 +285,7 @@ if ($smartctl && -x $smartctl){
my @lines = qx($smartctl -A /dev/$block); my @lines = qx($smartctl -A /dev/$block);
next if ($? != 0); next if ($? != 0);
foreach my $l (@lines){ foreach my $l (@lines){
if ($l =~ /Temperature_Celsius/){ if ($l =~ /Temperature_Celsius|Airflow_Temperature_Cel/){
$sensors->{$block} = { $sensors->{$block} = {
description => "$block temperature", description => "$block temperature",
threshold_low => $def_hd_temp_thres_high-$temp_hd_hyst, 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"; print "Found a temperature sensor using smartctl (megaraid): sda-$i\n";
last; last;
} }
elsif ($l =~ /Temperature_Celsius/){ elsif ($l =~ /Temperature_Celsius|Airflow_Temperature_Cel/){
$sensors->{'sda-' . $i} = { $sensors->{'sda-' . $i} = {
description => "Temperature for disk No $i on sda", description => "Temperature for disk No $i on sda",
threshold_low => $def_hd_temp_thres_high-$temp_hd_hyst, threshold_low => $def_hd_temp_thres_high-$temp_hd_hyst,

Loading…
Cancel
Save