Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround for PowerEdge 1950/2950 CMOS battery unknown #4

Open
bluikko opened this issue May 31, 2018 · 1 comment
Open

Workaround for PowerEdge 1950/2950 CMOS battery unknown #4

bluikko opened this issue May 31, 2018 · 1 comment

Comments

@bluikko
Copy link

bluikko commented May 31, 2018

OMSA 9.1 on PE 1950 and 2950 works incorrectly and CMOS battery status is always "unknown":
CRITICAL | 0 | Battery probe 0 [System Board CMOS Battery] is Unknown reading
It seems to be a problem with OMSA 9.1 which officially dropped support for the 9th generation servers.

The following patch is a workaround to simply set the status of the test to OK on these two system types. There is probably a better way to write the workaround but this works:

@@ -4160,14 +4160,6 @@

        $count{bat}++;
        next BATTERY if blacklisted('bp', $index);
-        if (($reading eq 'Unknown reading') and ($sysinfo{model} eq 'PowerEdge 1950')) {
-            $status = 'Ok';
-            $reading = 'Good';
-        } #XXX fix for old servers
-        if (($reading eq 'Unknown reading') and ($sysinfo{model} eq 'PowerEdge 2950')) {
-            $status = 'Ok';
-            $reading = 'Good';
-        } #XXX fix for old servers

        my $msg = sprintf 'Battery probe %d [%s] is %s',
          $index, $location, $reading;
@@ -5268,8 +5260,6 @@

 # Global status via SNMP.. extra safety check
 if ($globalstatus != $E_OK && $exit_code == $E_OK && !defined $opt{only}) {
-    exit $E_OK if ($sysinfo{model} eq 'PowerEdge 1950'); #XXX fix for old servers
-    exit $E_OK if ($sysinfo{model} eq 'PowerEdge 2950'); #XXX fix for old servers
     print "OOPS! Something is wrong with this server, but I don't know what. ";
     print "The global system health status is $reverse_exitcode{$globalstatus}, ";
     print "but every component check is OK. This may be a bug in the Nagios plugin, ";

@giannidaprile
Copy link

This is not necessary. Just add a blacklist entry in check_openmanage,conf for your host:

[hostname]
blacklist = bp=all

If blacklist is used global health status is ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants