add unit in explode-perfdata-max option

This commit is contained in:
garnier-quentin 2019-10-17 09:58:57 +02:00
parent 03329dae3c
commit 4fcf26cbc1
1 changed files with 1 additions and 1 deletions

View File

@ -1190,7 +1190,7 @@ sub apply_perfdata_explode {
foreach (@{$self->{perfdatas}}) {
next if ($_->{max} eq '');
if ($self->{explode_perfdata_total} == 2) {
$self->perfdata_add(label => $_->{label} . '_max', value => $_->{max});
$self->perfdata_add(label => $_->{label} . '_max', value => $_->{max}, unit => $_->{unit});
next;
}
foreach my $regexp (keys %{$self->{explode_perfdatas}}) {