Possibility to skip Non/Applicable sensor value

This commit is contained in:
Stéphane Duret 2016-08-02 10:31:23 +02:00 committed by GitHub
parent db3351baa8
commit 1f5981334a
1 changed files with 3 additions and 2 deletions

View File

@ -78,6 +78,8 @@ sub check {
foreach my $num (split /,/, $result->{enclTempSensorsPresent}) {
$num = centreon::plugins::misc::trim($num);
next if ($num !~ /[0-9]/ || !defined($current_temp[$num - 1]));
next if ($self->check_filter(section => 'temperature', instance => $shelf_addr . '.' . $num));
$warn_under_thr[$num - 1] =~ /(-*[0-9]+)C/;
my $wu_thr = $1;
@ -90,7 +92,6 @@ sub check {
$current_temp[$num - 1] =~ /(-*[0-9]+)C/;
my $current_value = $1;
next if ($self->check_filter(section => 'temperature', instance => $shelf_addr . '.' . $num));
$self->{components}->{temperature}->{total}++;
my $status = 'ok';
@ -134,4 +135,4 @@ sub check {
}
}
1;
1;