improve code of runtime refs #5554

This commit is contained in:
Kevin Duret 2014-06-09 10:23:14 +02:00
parent da7395fc8f
commit b74b439f9e
1 changed files with 1 additions and 3 deletions

View File

@ -84,10 +84,8 @@ sub run {
$valueStatus = $result->{$oid_pfsenseStatus};
$valueRuntime = $result->{$oid_pfsenseRuntime};
my $exit_code = 'unknown';
if ($valueStatus == 1) {
$exit_code = $self->{perfdata}->threshold_check(value => $valueRuntime,
my $exit_code = $self->{perfdata}->threshold_check(value => $valueRuntime,
threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);
$self->{output}->perfdata_add(label => 'runtime',
value => floor($valueRuntime / 100),