From b74b439f9e888887a8c908513362ecefd9169dbe Mon Sep 17 00:00:00 2001 From: Kevin Duret Date: Mon, 9 Jun 2014 10:23:14 +0200 Subject: [PATCH] improve code of runtime refs #5554 --- apps/pfsense/snmp/mode/runtime.pm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/pfsense/snmp/mode/runtime.pm b/apps/pfsense/snmp/mode/runtime.pm index 1ffedf396..b221ddb33 100644 --- a/apps/pfsense/snmp/mode/runtime.pm +++ b/apps/pfsense/snmp/mode/runtime.pm @@ -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),