Changes of Revision 34
[-] | Changed | check_openmanage.changes |
x 1
2 ------------------------------------------------------------------- 3 +Fri Dec 7 18:01:03 UTC 2012 - cs@linux-administrator.com 4 + 5 +- Update to version 3.7.7: 6 + * Minor feature enhancements, Minor bugfixes 7 + * bugfix Small fixes in PNP template 8 + * bugfix Fixed handling of functional but uncertified disks (Matthew Kent) 9 + * bugfix Fixed regression for pdisk cert on old hardware/OMSA 10 + * bugfix RPM spec: Fix docbook pkg name for suse 11 + * enhancement Reverse pdisk cert for OMSA 7.1.0 via SNMP, this works around an OMSA SNMP bug 12 + * enhancement Shortened a lot of reporting messages to make things more consistent 13 + * enhancement Rewritten logic on reporting pdisks 14 + * enhancement Added new special case for controller batteries 15 + 16 + 17 +------------------------------------------------------------------- 18 Wed Jul 4 15:15:27 UTC 2012 - cs@linux-administrator.com 19 20 - Update to version 3.7.6: 21 |
||
[-] | Changed | check_openmanage.spec ^ |
9 1
2 Summary: A Nagios plugin to check hardware health on Dell servers 3 Name: check_openmanage 4 -Version: 3.7.6 5 +Version: 3.7.7 6 Release: 2%{?dist} 7 License: GPL 8 Group: Applications/System 9 |
||
[+] | Changed | check_openmanage-3.7.7.tar.bz2/CHANGES ^ |
@@ -1,3 +1,16 @@ +3.7.7 2012-12-06 +------------------ + +* Small fixes in PNP template +* Fixed handling of functional but uncertified disks (Matthew Kent) +* Fixed regression for pdisk cert on old hardware/OMSA +* Reverse pdisk cert for OMSA 7.1.0 via SNMP, this works around an + OMSA SNMP bug +* Shortened a lot of reporting messages to make things more consistent +* Rewritten logic on reporting pdisks +* RPM spec: Fix docbook pkg name for suse +* Added new special case for controller batteries + 3.7.6 2012-06-28 ------------------ | ||
[+] | Changed | check_openmanage-3.7.7.tar.bz2/check_openmanage ^ |
@@ -49,7 +49,7 @@ # Version and similar info $NAME = 'check_openmanage'; -$VERSION = '3.7.6'; +$VERSION = '3.7.7'; $AUTHOR = 'Trond H. Amundsen'; $CONTACT = 't.h.amundsen@usit.uio.no'; @@ -1697,7 +1697,7 @@ } # Default else { - my $msg = sprintf 'Controller %d [%s] needs attention: %s', + my $msg = sprintf 'Controller %d [%s] is %s', $nexus, $name, $state; report('storage', $msg, $status2nagios{$status}, $nexus); } @@ -1827,8 +1827,10 @@ 7 => 'Recovering', 11 => 'Removed', 13 => 'Non-RAID', + 14 => 'Not Ready', 15 => 'Resynching', - 22 => 'Replacing', # FIXME: this one is not defined in the OMSA MIBs + 22 => 'Replacing', + 23 => 'Spinning Down', 24 => 'Rebuilding', 25 => 'No Media', 26 => 'Formatting', @@ -1839,6 +1841,7 @@ 40 => 'Clear', 41 => 'Unsupported', 53 => 'Incompatible', + 56 => 'Read Only', ); # Check physical disks on each of the controllers @@ -1875,6 +1878,12 @@ $ctrl = $nexus; $ctrl =~ s{\A (\d+) : .* \z}{$1}xms; } + + # workaround for OMSA 7.1.0 bug + if ($snmp && $sysinfo{om} eq '7.1.0') { + if ($cert == 1) { $cert = 0; } + elsif ($cert == 0) { $cert = 1; } + } } else { $name = get_nonempty_string('Name', $out, 'Unknown disk'); @@ -1888,7 +1897,7 @@ $media = get_nonempty_string('Media', $out, undef); $bus = get_nonempty_string('Bus Protocol', $out, undef); $spare = get_nonempty_string('Hot Spare', $out, q{}); - $cert = get_nonempty_string('Certified', $out, 1); + $cert = get_nonempty_string('Certified', $out, 'Yes'); $ctrl = $out->{ctrl}; $capacity = get_nonempty_string('Capacity', $out, q{}); $capacity =~ s{\A .*? \((\d+) \s bytes\) \z}{$1}xms; @@ -1944,49 +1953,53 @@ elsif (defined $bus && ! defined $media) { $busmedia = "$bus "; } elsif (! defined $bus && defined $media) { $busmedia = "$media "; } + # Variables to collect statuses and states + my @states = ($state); + my $stack = $status2nagios{$status}; + # Special case: Failure predicted - if ($fpred and $status eq 'Ok') { - my $msg = sprintf '%s [%s %s, %s] on ctrl %d needs attention: Failure Predicted', - $name, $vendor, $product, $capacity, $ctrl; - $msg .= " ($state)" if $state ne 'Predictive failure'; - report('storage', $msg, $E_WARNING, $nexus); - } - # Special case: Rebuilding / Replacing - elsif ($state =~ m{\A Rebuilding|Replacing \z}xms) { - my $msg = sprintf '%s [%s %s, %s] on ctrl %d is %s%s', - $name, $vendor, $product, $capacity, $ctrl, $state, $progr; - report('storage', $msg, $E_WARNING, $nexus); + if ($fpred) { + push @states, 'Failure Predicted'; + ++$stack if $stack == 0; } # Special case: Uncertified disk - elsif ($status eq 'Non-Critical' and !$cert) { - if (blacklisted('pdisk_cert', $nexus)) { - my $msg = sprintf '%s [%s %s, %s] on ctrl %d is %s, Not Certified', - $name, $vendor, $product, $capacity, $ctrl, $state; - report('storage', $msg, $E_OK, $nexus); + if (!$cert) { + # Functional non Dell disks get a Non-Critical status + if ($state eq 'Online' and $status eq 'Non-Critical' and blacklisted('pdisk_cert', $nexus)) { + --$stack; } else { - my $msg = sprintf '%s [%s %s, %s] on ctrl %d is Not Certified', - $name, $vendor, $product, $capacity, $ctrl; - report('storage', $msg, $E_WARNING, $nexus); + push @states, 'Not Certified'; } } # Special case: Foreign disk - elsif ($status eq 'Non-Critical' and $state eq 'Foreign' - and blacklisted('pdisk_foreign', $nexus)) { - my $msg = sprintf '%s [%s %s, %s] on ctrl %d is %s', - $name, $vendor, $product, $capacity, $ctrl, $state; - report('storage', $msg, $E_OK, $nexus); + if ($state eq 'Foreign' and blacklisted('pdisk_foreign', $nexus)) { + --$stack; + } + + # Create combined status and state + my $combo_state = join ', ', @states; + my $combo_status = undef; + if ($stack >= 2) { $combo_status = $E_CRITICAL; } + elsif ($stack == 1) { $combo_status = $E_WARNING; } + elsif ($stack <= 0) { $combo_status = $E_OK; } + + # Special case: Rebuilding / Replacing + if ($state =~ m{\A Rebuilding|Replacing \z}xms) { + my $msg = sprintf '%s [%s %s, %s] on ctrl %d is %s%s', + $name, $vendor, $product, $capacity, $ctrl, $state, $progr; + report('storage', $msg, $E_WARNING, $nexus); } # Default - elsif ($status ne 'Ok') { - my $msg = sprintf '%s [%s %s, %s] on ctrl %d needs attention: %s', - $name, $vendor, $product, $capacity, $ctrl, $state; - report('storage', $msg, $status2nagios{$status}, $nexus); + elsif ($combo_status != $E_OK) { + my $msg = sprintf '%s [%s %s, %s] on ctrl %d is %s', + $name, $vendor, $product, $capacity, $ctrl, $combo_state; + report('storage', $msg, $combo_status, $nexus); } # Ok else { my $msg = sprintf '%s [%s%s] on ctrl %d is %s', - $name, $busmedia, $capacity, $ctrl, $state; + $name, $busmedia, $capacity, $ctrl, $combo_state; if (defined $spare) { $msg .= " ($spare)"; } report('storage', $msg, $E_OK, $nexus); } @@ -2127,16 +2140,10 @@ report('storage', $msg, $E_WARNING, $nexus); } # Default - elsif ($status ne 'Ok') { - my $msg = sprintf q{Logical Drive '%s' [%s, %s] needs attention: %s}, - $dev, $layout, $size, $state; - report('storage', $msg, $status2nagios{$status}, $nexus); - } - # Ok else { my $msg = sprintf q{Logical Drive '%s' [%s, %s] is %s}, $dev, $layout, $size, $state; - report('storage', $msg, $E_OK, $nexus); + report('storage', $msg, $status2nagios{$status}, $nexus); } } return; @@ -2297,6 +2304,13 @@ $id, $ctrl, $state, $status; report('storage', $msg, $E_WARNING, $nexus); } + # Special case: Ready and Non-Critical and "Unknown" predicted status + elsif ($state eq 'Ready' && $status eq 'Non-Critical' && $pred eq 'Unknown') { + next BATTERY if blacklisted('bat_charge', $nexus); + my $msg = sprintf 'Cache Battery %d in controller %d predicted capacity is %s [probably harmless]', + $id, $ctrl, $pred; + report('storage', $msg, $E_WARNING, $nexus); + } # Default else { my $msg = sprintf 'Cache Battery %d in controller %d is %s', @@ -2626,7 +2640,7 @@ # Default if ($status ne 'Ok') { - my $msg = sprintf '%s in enclosure %s [%s] needs attention: %s', + my $msg = sprintf '%s in enclosure %s [%s] is %s', $name, $encl_id, $encl_name, $state; report('storage', $msg, $status2nagios{$status}, $nexus); } @@ -2729,17 +2743,9 @@ next PS if blacklisted('encl_ps', $nexus); # Default - if ($status ne 'Ok') { - my $msg = sprintf '%s in enclosure %s [%s] needs attention: %s', - $name, $encl_id, $encl_name, $state; - report('storage', $msg, $status2nagios{$status}, $nexus); - } - # Ok - else { - my $msg = sprintf '%s in enclosure %s [%s] is %s', - $name, $encl_id, $encl_name, $state; - report('storage', $msg, $E_OK, $nexus); - } + my $msg = sprintf '%s in enclosure %s [%s] is %s', + $name, $encl_id, $encl_name, $state; + report('storage', $msg, $status2nagios{$status}, $nexus); } return; } @@ -3064,16 +3070,10 @@ report('storage', $msg, $E_OK, $nexus); } # Default - elsif ($status ne 'Ok') { - my $msg = sprintf '%s in enclosure %s [%s] needs attention: %s', - $name, $encl_id, $encl_name, $state; - report('storage', $msg, $status2nagios{$status}, $nexus); - } - # Ok else { my $msg = sprintf '%s in enclosure %s [%s] is %s', $name, $encl_id, $encl_name, $state; - report('storage', $msg, $E_OK, $nexus); + report('storage', $msg, $status2nagios{$status}, $nexus); } } return; @@ -3190,7 +3190,7 @@ $index, $location, $size, $status; } else { - $msg = sprintf 'Memory module %d [%s, %s] needs attention: %s', + $msg = sprintf 'Memory module %d [%s, %s]: %s', $index, $location, $size, (join q{, }, @failures); } @@ -3418,16 +3418,9 @@ $count{power}++; next PS if blacklisted('ps', $index); - if ($status ne 'Ok') { - my $msg = sprintf 'Power Supply %d [%s] needs attention: %s', - $index, $type, $state; - report('chassis', $msg, $status2nagios{$status}, $index); - } - else { - my $msg = sprintf 'Power Supply %d [%s]: %s', - $index, $type, $state; - report('chassis', $msg, $E_OK, $index); - } + my $msg = sprintf 'Power Supply %d [%s]: %s', + $index, $type, $state; + report('chassis', $msg, $status2nagios{$status}, $index); } return; } @@ -3929,17 +3922,9 @@ } # Default - if ($status ne 'Ok') { - my $msg = sprintf 'Processor %d [%s] needs attention: %s', - $index, $brand, $state; - report('chassis', $msg, $status2nagios{$status}, $index); - } - # Ok - else { - my $msg = sprintf 'Processor %d [%s] is %s', - $index, $brand, $state; - report('chassis', $msg, $E_OK, $index); - } + my $msg = sprintf 'Processor %d [%s] is %s', + $index, $brand, $state; + report('chassis', $msg, $status2nagios{$status}, $index); } return; } @@ -4527,7 +4512,7 @@ next SDCARD if blacklisted('sd', $index); if ($status ne 'Ok') { - my $msg = sprintf 'SD Card %d needs attention: %s', + my $msg = sprintf 'SD Card %d is %s', $index, $state; report('chassis', $msg, $E_WARNING, $index); } @@ -4915,9 +4900,14 @@ $snmp ? get_snmp_chassis_bios() : get_omreport_chassis_bios(); } - # Get OMSA information. Only if needed - if ($opt{okinfo} >= 3 or $opt{debug}) { - $snmp ? get_snmp_about() : get_omreport_about(); + # Get OMSA version information + if ($snmp) { + # always for SNMP because of OMSA 7.1.0 bug + get_snmp_about(); + } + elsif ($opt{okinfo} >= 3 or $opt{debug}) { + # only if needed + get_omreport_about(); } # Return now if debug | ||
Changed | check_openmanage-3.7.7.tar.bz2/check_openmanage.exe ^ | |
[+] | Changed | check_openmanage-3.7.7.tar.bz2/check_openmanage.php ^ |
@@ -5,8 +5,8 @@ # Author: Trond Hasle Amundsen # Contact: t.h.amundsen@usit.uio.no # Website: http://folk.uio.no/trondham/software/check_openmanage.html -# Date: 2012-06-28 -# Version: 3.7.6 +# Date: 2012-12-06 +# Version: 3.7.7 # # Copyright (C) 2008-2012 Trond Hasle Amundsen # @@ -67,11 +67,11 @@ switch ($arg) { default: $vlabel = "Celsius"; - $unit = "°C"; + $unit = "\xc2\xb0C"; break; case "F": $vlabel = "Fahrenheit"; - $unit = "°F"; + $unit = "\xc2\xb0F"; break; case "K": $vlabel = "Kelvin"; @@ -79,7 +79,7 @@ break; case "R": $vlabel = "Rankine"; - $unit = "°R"; + $unit = "\xc2\xb0R"; break; } return array($unit, $vlabel); @@ -409,7 +409,7 @@ } # AMPERAGE PROBE - if (preg_match('/^A/', $label)) { + if (preg_match('/^A/', $label) && preg_match('/Current/', $label)) { $first = 0; if ($visited_amp == 0) { | ||
[+] | Changed | check_openmanage-3.7.7.tar.bz2/debian/changelog ^ |
@@ -1,3 +1,9 @@ +check-openmanage (3.7.7-1) unstable; urgency=low + + * New upstream release. + + -- Trond Hasle Amundsen <t.h.amundsen@usit.uio.no> Thu, 06 Dec 2012 12:00:00 +0100 + check-openmanage (3.7.6-1) unstable; urgency=low * New upstream release. | ||
[+] | Changed | check_openmanage-3.7.7.tar.bz2/man/check_openmanage.8 ^ |
@@ -2,12 +2,12 @@ .\" Title: check_openmanage .\" Author: Trond Hasle Amundsen <t.h.amundsen@usit.uio.no> .\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/> -.\" Date: 06/28/2012 +.\" Date: 12/06/2012 .\" Manual: Nagios plugin .\" Source: check_openmanage .\" Language: English .\" -.TH "CHECK_OPENMANAGE" "8" "06/28/2012" "check_openmanage" "Nagios plugin" +.TH "CHECK_OPENMANAGE" "8" "12/06/2012" "check_openmanage" "Nagios plugin" .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- | ||
[+] | Changed | check_openmanage-3.7.7.tar.bz2/man/check_openmanage.conf.5 ^ |
@@ -2,12 +2,12 @@ .\" Title: check_openmanage.conf .\" Author: Trond Hasle Amundsen <t.h.amundsen@usit.uio.no> .\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/> -.\" Date: 06/28/2012 +.\" Date: 12/06/2012 .\" Manual: Nagios plugin .\" Source: check_openmanage .\" Language: English .\" -.TH "CHECK_OPENMANAGE\&.C" "5" "06/28/2012" "check_openmanage" "Nagios plugin" +.TH "CHECK_OPENMANAGE\&.C" "5" "12/06/2012" "check_openmanage" "Nagios plugin" .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- | ||
[+] | Changed | check_openmanage-3.7.7.tar.bz2/nagios-plugins-openmanage.spec ^ |
@@ -5,16 +5,19 @@ %global debug_package %{nil} # SUSE installs Nagios plugins under /usr/lib, even on 64-bit -# It also uses noarch for non-binary Nagios plugins +# It also uses noarch for non-binary Nagios plugins and has different +# package names for docbook. %if %{defined suse_version} %global nagiospluginsdir /usr/lib/nagios/plugins +%global docbookpkg docbook-xsl-stylesheets BuildArch: noarch %else %global nagiospluginsdir %{_libdir}/nagios/plugins +%global docbookpkg docbook-style-xsl %endif Name: nagios-plugins-openmanage -Version: 3.7.6 +Version: 3.7.7 Release: 1%{?dist} Summary: Nagios plugin to monitor hardware health on Dell servers @@ -28,7 +31,7 @@ # Building requires Docbook XML BuildRequires: libxslt BuildRequires: libxml2 -BuildRequires: docbook-style-xsl +BuildRequires: %{docbookpkg} # Rpmbuild doesn't find these perl dependencies Requires: perl(Config::Tiny) @@ -80,6 +83,9 @@ %changelog +* Thu Dec 6 2012 Trond Hasle Amundsen <t.h.amundsen@usit.uio.no> - 3.7.7-1 +- Version 3.7.7 + * Wed Jun 28 2012 Trond Hasle Amundsen <t.h.amundsen@usit.uio.no> - 3.7.6-1 - Version 3.7.6 - Added BuildRequires for Docbook XML (manual pages) |