From ae262860808fda49f0667d7024e52f07f8af90b4 Mon Sep 17 00:00:00 2001 From: garnier-quentin Date: Wed, 6 Feb 2019 11:10:21 +0100 Subject: [PATCH] add vmware snapshot description --- centreon-plugins/apps/vmware/connector/mode/snapshotvm.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/centreon-plugins/apps/vmware/connector/mode/snapshotvm.pm b/centreon-plugins/apps/vmware/connector/mode/snapshotvm.pm index 8749c4005..40af1c07c 100644 --- a/centreon-plugins/apps/vmware/connector/mode/snapshotvm.pm +++ b/centreon-plugins/apps/vmware/connector/mode/snapshotvm.pm @@ -125,9 +125,13 @@ sub run { $response->{data}->{$vm_id}->{'config.annotation'} ne '') { $prefix_msg .= ' [' . $options{custom}->strip_cr(value => $response->{data}->{$vm_id}->{'config.annotation'}) . ']'; } + my $suffix_msg = ''; + if (defined($_->{description}) && $_->{description} ne '') { + $suffix_msg = ' [' . $options{custom}->strip_cr(value => $_->{description}) . ']'; + } if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) { $vm_errors{$exit}->{$vm_name} = 1; - $self->{output}->output_add(long_msg => "$prefix_msg snapshot create time: " . $_->{create_time}); + $self->{output}->output_add(long_msg => "$prefix_msg snapshot create time: " . $_->{create_time} . $suffix_msg); } } }