+ Fix #342
This commit is contained in:
parent
8159490999
commit
f7ebb59e7f
|
@ -82,20 +82,23 @@ sub check {
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
$self->{components}->{blade}->{total}++;
|
$self->{components}->{blade}->{total}++;
|
||||||
|
$result->{bladeName} = defined($result->{bladeName}) ? $result->{bladeName} : '-';
|
||||||
|
|
||||||
if ($result->{bladePowerState} =~ /off/) {
|
if ($result->{bladePowerState} =~ /off/) {
|
||||||
$self->{output}->output_add(long_msg => sprintf("Blade '%s' power state is %s",
|
$self->{output}->output_add(long_msg => sprintf("Blade '%s/%s' power state is %s",
|
||||||
$result->{bladeId}, $result->{bladePowerState}));
|
$result->{bladeName}, $result->{bladeId}, $result->{bladePowerState},
|
||||||
|
));
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
|
||||||
$self->{output}->output_add(long_msg => sprintf("Blade '%s' state is %s [power state: %s]",
|
$self->{output}->output_add(long_msg => sprintf("Blade '%s/%s' state is %s [power state: %s]",
|
||||||
$result->{bladeId}, $result->{bladeHealthState}, $result->{bladePowerState}));
|
$result->{bladeName}, $result->{bladeId}, $result->{bladeHealthState}, $result->{bladePowerState},
|
||||||
|
));
|
||||||
my $exit = $self->get_severity(section => 'blade', value => $result->{bladeHealthState});
|
my $exit = $self->get_severity(section => 'blade', value => $result->{bladeHealthState});
|
||||||
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(severity => $exit,
|
$self->{output}->output_add(severity => $exit,
|
||||||
short_msg => sprintf("Blade '%s' state is %s",
|
short_msg => sprintf("Blade '%s/%s' state is %s",
|
||||||
$result->{bladeId}, $result->{bladeHealthState}));
|
$result->{bladeName}, $result->{bladeId}, $result->{bladeHealthState}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue