mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-27 23:54:18 +02:00
Fix #689
This commit is contained in:
parent
b03e2c6f78
commit
6bd8acd07f
@ -69,7 +69,7 @@ sub run {
|
|||||||
my $exit = $self->{perfdata}->threshold_check(value => $totalCpuUsed,
|
my $exit = $self->{perfdata}->threshold_check(value => $totalCpuUsed,
|
||||||
threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);
|
threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);
|
||||||
$self->{output}->output_add(severity => $exit,
|
$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 => '%',
|
$self->{output}->perfdata_add(label => "cpu", unit => '%',
|
||||||
value => $totalCpuUsed,
|
value => $totalCpuUsed,
|
||||||
warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'),
|
warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user