diff --git a/connectors/vmware/src/centreon/vmware/cmdalarmdatacenter.pm b/connectors/vmware/src/centreon/vmware/cmdalarmdatacenter.pm index ad51078c7..d05b5e85d 100644 --- a/connectors/vmware/src/centreon/vmware/cmdalarmdatacenter.pm +++ b/connectors/vmware/src/centreon/vmware/cmdalarmdatacenter.pm @@ -126,7 +126,7 @@ sub run { my $entity = centreon::vmware::common::get_view($self->{connector}, $_->entity, ['name']); my $alarm = centreon::vmware::common::get_view($self->{connector}, $_->alarm, ['info']); - $dc_alarms->{$datacenter_view->name}->{alarms}->{$_->key} = { type => $_->entity->type, name => $entity->name, + $dc_alarms->{$datacenter_view->name}->{alarms}->{$_->key} = { type => $_->entity->type, entity_name => $entity->name, time => $_->time, name => $alarm->info->name, description => $alarm->info->description, status => $_->overallStatus->val}; @@ -152,11 +152,12 @@ sub run { $self->{manager}->{output}->output_add(long_msg => sprintf(" %s warn alarm(s) found(s) - %s critical alarm(s) found(s)", $dc_alarms->{$dc_name}->{yellow}, $dc_alarms->{$dc_name}->{red})); foreach my $alert (keys %{$dc_alarms->{$dc_name}->{alarms}}) { - $self->{manager}->{output}->output_add(long_msg => sprintf(" [%s] [%s] [%s] [%s] %s", + $self->{manager}->{output}->output_add(long_msg => sprintf(" [%s] [%s] [%s] [%s] %s/%s", $dc_alarms->{$dc_name}->{alarms}->{$alert}->{status}, - $dc_alarms->{$dc_name}->{alarms}->{$alert}->{name}, - $dc_alarms->{$dc_name}->{alarms}->{$alert}->{time}, $dc_alarms->{$dc_name}->{alarms}->{$alert}->{type}, + $dc_alarms->{$dc_name}->{alarms}->{$alert}->{entity_name}, + $dc_alarms->{$dc_name}->{alarms}->{$alert}->{time}, + $dc_alarms->{$dc_name}->{alarms}->{$alert}->{name}, $dc_alarms->{$dc_name}->{alarms}->{$alert}->{description} )); } diff --git a/connectors/vmware/src/centreon/vmware/cmdalarmhost.pm b/connectors/vmware/src/centreon/vmware/cmdalarmhost.pm index af9b1983d..595db46f8 100644 --- a/connectors/vmware/src/centreon/vmware/cmdalarmhost.pm +++ b/connectors/vmware/src/centreon/vmware/cmdalarmhost.pm @@ -125,10 +125,10 @@ sub run { my $entity = centreon::vmware::common::get_view($self->{connector}, $_->entity, ['name']); my $alarm = centreon::vmware::common::get_view($self->{connector}, $_->alarm, ['info']); - $host_alarms->{$host_view->name}->{alarms}->{$_->key} = { type => $_->entity->type, name => $entity->name, - time => $_->time, name => $alarm->info->name, - description => $alarm->info->description, - status => $_->overallStatus->val}; + $host_alarms->{$host_view->name}->{alarms}->{$_->key} = { type => $_->entity->type, entity_name => $entity->name, + time => $_->time, name => $alarm->info->name, + description => $alarm->info->description, + status => $_->overallStatus->val}; $host_alarms->{$host_view->name}->{$_->overallStatus->val}++; $total_alarms->{$_->overallStatus->val}++; } @@ -151,11 +151,12 @@ sub run { $self->{manager}->{output}->output_add(long_msg => sprintf(" %s warn alarm(s) found(s) - %s critical alarm(s) found(s)", $host_alarms->{$host_name}->{yellow}, $host_alarms->{$host_name}->{red})); foreach my $alert (keys %{$host_alarms->{$host_name}->{alarms}}) { - $self->{manager}->{output}->output_add(long_msg => sprintf(" [%s] [%s] [%s] [%s] %s", + $self->{manager}->{output}->output_add(long_msg => sprintf(" [%s] [%s] [%s] [%s] %s/%s", $host_alarms->{$host_name}->{alarms}->{$alert}->{status}, - $host_alarms->{$host_name}->{alarms}->{$alert}->{name}, - $host_alarms->{$host_name}->{alarms}->{$alert}->{time}, $host_alarms->{$host_name}->{alarms}->{$alert}->{type}, + $host_alarms->{$host_name}->{alarms}->{$alert}->{entity_name}, + $host_alarms->{$host_name}->{alarms}->{$alert}->{time}, + $host_alarms->{$host_name}->{alarms}->{$alert}->{name}, $host_alarms->{$host_name}->{alarms}->{$alert}->{description} )); }