+ enhance netapp shelf to avoid unitialized
This commit is contained in:
parent
be8bdf2ee8
commit
2b1880531c
|
@ -77,7 +77,7 @@ sub check {
|
||||||
|
|
||||||
foreach my $num (split /,/, $result->{enclTempSensorsPresent}) {
|
foreach my $num (split /,/, $result->{enclTempSensorsPresent}) {
|
||||||
$num = centreon::plugins::misc::trim($num);
|
$num = centreon::plugins::misc::trim($num);
|
||||||
next if ($num !~ /[0-9]/);
|
next if ($num !~ /[0-9]/ || !defined($current_temp[$num - 1]));
|
||||||
|
|
||||||
$warn_under_thr[$num - 1] =~ /(-*[0-9]+)C/;
|
$warn_under_thr[$num - 1] =~ /(-*[0-9]+)C/;
|
||||||
my $wu_thr = $1;
|
my $wu_thr = $1;
|
||||||
|
|
|
@ -78,7 +78,7 @@ sub check {
|
||||||
my @values = defined($result->{enclVoltSensorsPresent}) ? split /,/, $result->{enclVoltSensorsPresent} : ();
|
my @values = defined($result->{enclVoltSensorsPresent}) ? split /,/, $result->{enclVoltSensorsPresent} : ();
|
||||||
foreach my $num (@values) {
|
foreach my $num (@values) {
|
||||||
$num = centreon::plugins::misc::trim($num);
|
$num = centreon::plugins::misc::trim($num);
|
||||||
next if ($num !~ /[0-9]/);
|
next if ($num !~ /[0-9]/ || !defined($current_volt[$num - 1]));
|
||||||
|
|
||||||
my $wu_thr = (defined($warn_under_thr[$num - 1]) && $warn_under_thr[$num - 1] =~ /(^|\s)(-*[0-9]+)/) ? $2 : '';
|
my $wu_thr = (defined($warn_under_thr[$num - 1]) && $warn_under_thr[$num - 1] =~ /(^|\s)(-*[0-9]+)/) ? $2 : '';
|
||||||
my $cu_thr = (defined($crit_under_thr[$num - 1]) && $crit_under_thr[$num - 1] =~ /(^|\s)(-*[0-9]+)/) ? $2 : '';
|
my $cu_thr = (defined($crit_under_thr[$num - 1]) && $crit_under_thr[$num - 1] =~ /(^|\s)(-*[0-9]+)/) ? $2 : '';
|
||||||
|
|
Loading…
Reference in New Issue