This commit is contained in:
qgarnier 2017-06-19 11:46:35 +02:00
parent 20aef1a35e
commit 931101ce39
1 changed files with 1 additions and 1 deletions

View File

@ -69,7 +69,7 @@ sub run {
my $exit = $self->{perfdata}->threshold_check(value => $totalCpuUsed,
threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);
$self->{output}->output_add(severity => $exit,
short_msg => sprintf("CPU Usage: %d (System: %d User: %d Idle: %d)", $totalCpuUsed, $result->{$oid_procUsrTime}, $result->{$oid_procSysTime}, $result->{$oid_procIdleTime} ));
short_msg => sprintf("CPU Usage: %d (System: %d User: %d Idle: %d)", $totalCpuUsed, $result->{$oid_procSysTime}, $result->{$oid_procUsrTime}, $result->{$oid_procIdleTime} ));
$self->{output}->perfdata_add(label => "cpu", unit => '%',
value => $totalCpuUsed,
warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'),