This commit is contained in:
Quentin Garnier 2014-03-26 13:22:27 +01:00
parent c65622d7d3
commit 35659146b3
1 changed files with 2 additions and 1 deletions

View File

@ -39,6 +39,7 @@ use strict;
use warnings;
my %conditions = (
0 => ['other', 'UNKNOWN'], # maybe on standby mode only!!
1 => ['other', 'CRITICAL'],
2 => ['ok', 'OK'],
3 => ['degraded', 'WARNING'],
@ -90,7 +91,7 @@ sub check {
$self->{output}->output_add(long_msg => sprintf("Enclosure management module %d is %s, status is %s [serial: %s, part: %s, spare: %s].",
$instance, ${$conditions{$man_condition}}[0], $map_role{$man_role},
$man_serial, $man_part, $man_spare));
if ($man_condition != 2) {
if ($man_role == 2 && $man_condition != 2) {
$self->{output}->output_add(severity => ${$conditions{$man_condition}}[1],
short_msg => sprintf("Enclosure management module %d is %s, status is %s",
$instance, ${$conditions{$man_condition}}[0], $map_role{$man_role}));