add unit in explode perfdata

This commit is contained in:
garnier-quentin 2019-10-17 09:33:37 +02:00
parent b0b2613aa7
commit 03329dae3c

View File

@ -1195,7 +1195,7 @@ sub apply_perfdata_explode {
}
foreach my $regexp (keys %{$self->{explode_perfdatas}}) {
if ($_->{label} =~ /$regexp/) {
$self->perfdata_add(label => $self->{explode_perfdatas}->{$regexp}, value => $_->{max});
$self->perfdata_add(label => $self->{explode_perfdatas}->{$regexp}, value => $_->{max}, unit => $_->{unit});
last;
}
}