+ add unit in perfdata

This commit is contained in:
garnier-quentin 2016-10-14 15:53:49 +02:00
parent 9106b51670
commit 08e85d7edd
1 changed files with 1 additions and 1 deletions

View File

@ -65,7 +65,7 @@ sub run {
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}));
$self->{output}->perfdata_add(label => "cpu",
$self->{output}->perfdata_add(label => "cpu", unit => '%',
value => sprintf("%.2f", $result->{$oid_cpuPercentUsage}),
warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'),
critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical'),