+ add percent in output

This commit is contained in:
garnier-quentin 2016-10-14 15:54:58 +02:00
parent 08e85d7edd
commit 4f1b145bed
1 changed files with 1 additions and 1 deletions

View File

@ -64,7 +64,7 @@ sub run {
my $exit = $self->{perfdata}->threshold_check(value => $result->{$oid_cpuPercentUsage},
threshold => [ { label => 'critical', exit_litteral => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);
$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 => '%',
value => sprintf("%.2f", $result->{$oid_cpuPercentUsage}),
warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'),