diff --git a/hardware/server/dell/idrac/snmp/mode/globalstatus.pm b/hardware/server/dell/idrac/snmp/mode/globalstatus.pm index 563069482..1ec788494 100644 --- a/hardware/server/dell/idrac/snmp/mode/globalstatus.pm +++ b/hardware/server/dell/idrac/snmp/mode/globalstatus.pm @@ -77,18 +77,18 @@ sub run { my $oid_globalStorageStatus = '.1.3.6.1.4.1.674.10892.5.2.3.0'; my $result = $self->{snmp}->get_leef(oids => [$oid_drsGlobalSystemStatus, $oid_globalSystemStatus, $oid_globalStorageStatus], nothing_quit => 1); - # iDrac 6 - if (defined($result->{$oid_drsGlobalSystemStatus})) { - $self->{output}->output_add(severity => ${$states{$result->{$oid_drsGlobalSystemStatus}}}[1], - short_msg => sprintf("Overall global status is '%s'", - ${$states{$result->{$oid_drsGlobalSystemStatus}}}[0])); - } else { # iDrac > 6 + # iDrac > 6 + if (defined($result->{$oid_globalSystemStatus})) { $self->{output}->output_add(severity => ${$states{$result->{$oid_globalSystemStatus}}}[1], short_msg => sprintf("Overall global status is '%s'", ${$states{$result->{$oid_globalSystemStatus}}}[0])); $self->{output}->output_add(severity => ${$states{$result->{$oid_globalStorageStatus}}}[1], short_msg => sprintf("Overall storage status is '%s'", ${$states{$result->{$oid_globalStorageStatus}}}[0])); + } else { # iDrac <= 6 + $self->{output}->output_add(severity => ${$states{$result->{$oid_drsGlobalSystemStatus}}}[1], + short_msg => sprintf("Overall global status is '%s'", + ${$states{$result->{$oid_drsGlobalSystemStatus}}}[0])); } $self->{output}->display(); $self->{output}->exit(); @@ -107,4 +107,4 @@ Check the overall status of iDrac card. =back =cut - \ No newline at end of file +