mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-13 00:34:52 +02:00
improve code of runtime refs #5554
This commit is contained in:
parent
176cc4fd5c
commit
477e735e09
@ -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),
|
||||
|
Loading…
x
Reference in New Issue
Block a user