fix metric name in meta service mode

This commit is contained in:
Colin GAGNAIRE 2018-02-07 15:44:10 +01:00
parent 3fdc1da6f1
commit 6bf72a5cfd
1 changed files with 1 additions and 1 deletions

View File

@ -219,7 +219,7 @@ sub run {
my $display = defined($row->{meta_display}) ? $row->{meta_display} : $row->{calcul_type} . ' - value : %f';
$self->{output}->output_add(severity => $exit,
short_msg => sprintf($display, $result));
$self->{output}->perfdata_add(label => (defined($DSTYPE{$row->{data_source_type}}) ? $DSTYPE{$row->{data_source_type}} : 'g') . '[value]',
$self->{output}->perfdata_add(label => (defined($DSTYPE{$row->{data_source_type}}) ? $DSTYPE{$row->{data_source_type}} : 'g') . '[' . $row->{metric} . ']',
value => sprintf("%02.2f", $result),
warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'),
critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical')