mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-10 07:14:40 +02:00
fix(emc/unisphere): hardware mode - uninitialized value sp component (#3184)
This commit is contained in:
parent
c1f7024885
commit
d7dd65e3aa
@ -44,11 +44,12 @@ sub check {
|
|||||||
next if ($self->check_filter(section => 'sp', instance => $instance));
|
next if ($self->check_filter(section => 'sp', instance => $instance));
|
||||||
$self->{components}->{sp}->{total}++;
|
$self->{components}->{sp}->{total}++;
|
||||||
|
|
||||||
|
my $name = defined($result->{content}->{name}) ? $result->{content}->{name} : $result->{content}->{id};
|
||||||
my $health = $health_status->{ $result->{content}->{health}->{value} };
|
my $health = $health_status->{ $result->{content}->{health}->{value} };
|
||||||
$self->{output}->output_add(
|
$self->{output}->output_add(
|
||||||
long_msg => sprintf(
|
long_msg => sprintf(
|
||||||
"storage processor '%s' status is '%s' [instance = %s]",
|
"storage processor '%s' status is '%s' [instance = %s]",
|
||||||
$result->{content}->{name}, $health, $instance,
|
$name, $health, $instance
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -56,7 +57,7 @@ sub check {
|
|||||||
if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) {
|
if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) {
|
||||||
$self->{output}->output_add(
|
$self->{output}->output_add(
|
||||||
severity => $exit,
|
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)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,7 @@ sub check {
|
|||||||
$self->{output}->output_add(
|
$self->{output}->output_add(
|
||||||
long_msg => sprintf(
|
long_msg => sprintf(
|
||||||
"ssd '%s' status is '%s' [instance = %s]",
|
"ssd '%s' status is '%s' [instance = %s]",
|
||||||
$name, $health, $instance,
|
$name, $health, $instance
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user