diff --git a/centreon-plugins/storage/emc/unisphere/restapi/mode/components/sp.pm b/centreon-plugins/storage/emc/unisphere/restapi/mode/components/sp.pm index 5e1afa9c6..6201b2193 100644 --- a/centreon-plugins/storage/emc/unisphere/restapi/mode/components/sp.pm +++ b/centreon-plugins/storage/emc/unisphere/restapi/mode/components/sp.pm @@ -44,19 +44,20 @@ sub check { next if ($self->check_filter(section => 'sp', instance => $instance)); $self->{components}->{sp}->{total}++; + my $name = defined($result->{content}->{name}) ? $result->{content}->{name} : $result->{content}->{id}; my $health = $health_status->{ $result->{content}->{health}->{value} }; $self->{output}->output_add( long_msg => sprintf( "storage processor '%s' status is '%s' [instance = %s]", - $result->{content}->{name}, $health, $instance, + $name, $health, $instance ) ); - + my $exit = $self->get_severity(label => 'health', section => 'sp', value => $health); if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) { $self->{output}->output_add( severity => $exit, - short_msg => sprintf("Storage processor '%s' status is '%s'", $result->{content}->{name}, $health) + short_msg => sprintf("Storage processor '%s' status is '%s'", $name, $health) ); } } diff --git a/centreon-plugins/storage/emc/unisphere/restapi/mode/components/ssd.pm b/centreon-plugins/storage/emc/unisphere/restapi/mode/components/ssd.pm index d70d79edf..b39e484ff 100644 --- a/centreon-plugins/storage/emc/unisphere/restapi/mode/components/ssd.pm +++ b/centreon-plugins/storage/emc/unisphere/restapi/mode/components/ssd.pm @@ -49,7 +49,7 @@ sub check { $self->{output}->output_add( long_msg => sprintf( "ssd '%s' status is '%s' [instance = %s]", - $name, $health, $instance, + $name, $health, $instance ) );