Merge pull request #2002 from UrBnW/checkpoint

fix(checkpoint) unknown if can't compute thresholds
This commit is contained in:
qgarnier 2020-05-15 09:16:26 +02:00 committed by GitHub
commit 8299885cc0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -76,6 +76,13 @@ sub run {
$value = $prct_used;
%total_options = ( total => $result->{$oid_fwConnTableLimit}, cast_int => 1);
}
} elsif ($self->{option_results}->{units} eq '%') {
$self->{output}->output_add(
severity => 'UNKNOWN',
short_msg => "Couldn't get fwConnTableLimit OID ($oid_fwConnTableLimit) to compute thresholds"
);
$self->{output}->display();
$self->{output}->exit();
}
my $exit = $self->{perfdata}->threshold_check(value => $value,