fix status output refs #5168

This commit is contained in:
Kevin Duret 2014-10-29 08:05:45 +01:00
parent 6cfbda86f2
commit 7f96517bae
2 changed files with 6 additions and 6 deletions

View File

@ -82,14 +82,14 @@ sub check {
$self->{components}->{iocard}->{total}++;
$self->{output}->output_add(long_msg => sprintf("IO cards '%s' state is '%s' [presence: %s].",
$iocard_dn, ${$thresholds->{overall_status}->{$iocard_operstate}}[0],
$iocard_dn, ${$thresholds->{operability}->{$iocard_operstate}}[0],
${$thresholds->{presence}->{$iocard_presence}}[0]
));
$exit = $self->get_severity(section => 'iocard', threshold => 'overall_status', value => $iocard_operstate);
$exit = $self->get_severity(section => 'iocard', threshold => 'operability', value => $iocard_operstate);
if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) {
$self->{output}->output_add(severity => $exit,
short_msg => sprintf("IO cards '%s' state is '%s'.",
$iocard_dn, ${$thresholds->{overall_status}->{$iocard_operstate}}[0]
$iocard_dn, ${$thresholds->{operability}->{$iocard_operstate}}[0]
)
);
}

View File

@ -82,14 +82,14 @@ sub check {
$self->{components}->{psu}->{total}++;
$self->{output}->output_add(long_msg => sprintf("power supply '%s' state is '%s' [presence: %s].",
$psu_dn, ${$thresholds->{overall_status}->{$psu_operstate}}[0],
$psu_dn, ${$thresholds->{operability}->{$psu_operstate}}[0],
${$thresholds->{presence}->{$psu_presence}}[0]
));
$exit = $self->get_severity(section => 'psu', threshold => 'overall_status', value => $psu_operstate);
$exit = $self->get_severity(section => 'psu', threshold => 'operability', value => $psu_operstate);
if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) {
$self->{output}->output_add(severity => $exit,
short_msg => sprintf("power supply '%s' state is '%s'.",
$psu_dn, ${$thresholds->{overall_status}->{$psu_operstate}}[0]
$psu_dn, ${$thresholds->{operability}->{$psu_operstate}}[0]
)
);
}