+ add percent in output
This commit is contained in:
parent
08e85d7edd
commit
4f1b145bed
|
@ -64,7 +64,7 @@ sub run {
|
||||||
my $exit = $self->{perfdata}->threshold_check(value => $result->{$oid_cpuPercentUsage},
|
my $exit = $self->{perfdata}->threshold_check(value => $result->{$oid_cpuPercentUsage},
|
||||||
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 : %.2f", $result->{$oid_cpuPercentUsage}));
|
short_msg => sprintf("CPU Usage : %.2f %%", $result->{$oid_cpuPercentUsage}));
|
||||||
$self->{output}->perfdata_add(label => "cpu", unit => '%',
|
$self->{output}->perfdata_add(label => "cpu", unit => '%',
|
||||||
value => sprintf("%.2f", $result->{$oid_cpuPercentUsage}),
|
value => sprintf("%.2f", $result->{$oid_cpuPercentUsage}),
|
||||||
warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'),
|
warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'),
|
||||||
|
|
Loading…
Reference in New Issue