Changes of Revision 22
[-] | Added | check_openmanage.changes |
x 1
2 +------------------------------------------------------------------- 3 +Sun May 15 16:15:45 UTC 2011 - cs@linux-administrator.com 4 + 5 +- Update to version 3.6.7: 6 + * Minor bugfixes 7 + * A regression wrt. non-certified drives were fixed. The plugin failed to identify non-certified physical drives via SNMP. 8 + * Added the ability to blacklist non-certified drives with the 'pdisk_cert' blacklisting keyword. 9 + 10 +- Changes in version 3.6.6: 11 + * Minor bugfixes 12 + * Fixed typo in help output 13 + * SD card check is now included if the parameter '--only chassis' is specified 14 + * The plugin will issue a proper warning if a physical drive is uncertified, instead of an unspecified warning. One or more uncertified drives will make the controller go into a non-critical (warning) state. 15 + * Slightly improved reporting of fan status 16 + * Exit with value 3 (unknown) if printing debug, help or version info. This is considered best practice for Nagios plugins. 17 + * Workaround added for logical SAS connectors to external storage enclosures, when using check_openmanage in local mode with OMSA 6.4.0 or later versions. The output from omreport could contain lines that the plugin was unable to parse, which would lead to internal errors. 18 + 19 + 20 |
||
[-] | 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.6.5 5 +Version: 3.6.7 6 Release: 1%{?dist} 7 License: GPL 8 Group: Applications/System 9 |
||
[+] | Changed | check_openmanage-3.6.7.tar.bz2/CHANGES ^ |
@@ -1,3 +1,30 @@ +3.6.7 2011-05-12 +------------------ + +* A regression wrt. non-certified drives were fixed. The plugin failed + to identify non-certified physical drives via SNMP. +* Added the ability to blacklist non-certified drives with the + 'pdisk_cert' blacklisting keyword. + +3.6.6 2011-04-28 +------------------ + +* Fixed typo in help output +* SD card check is now included if the parameter '--only chassis' is + specified +* The plugin will issue a proper warning if a physical drive is + uncertified, instead of an unspecified warning. One or more + uncertified drives will make the controller go into a non-critical + (warning) state. +* Slightly improved reporting of fan status +* Exit with value 3 (unknown) if printing debug, help or version + info. This is considered best practice for Nagios plugins. +* Workaround added for logical SAS connectors to external storage + enclosures, when using check_openmanage in local mode with OMSA + 6.4.0 or later versions. The output from omreport could contain + lines that the plugin was unable to parse, which would lead to + internal errors. + 3.6.5 2011-02-09 ------------------ | ||
[+] | Changed | check_openmanage-3.6.7.tar.bz2/check_openmanage ^ |
@@ -51,7 +51,7 @@ # Version and similar info $NAME = 'check_openmanage'; -$VERSION = '3.6.5'; +$VERSION = '3.6.7'; $AUTHOR = 'Trond H. Amundsen'; $CONTACT = 't.h.amundsen@usit.uio.no'; @@ -205,13 +205,13 @@ # If user requested help if ($opt{help}) { print $USAGE, $HELP; - exit $E_OK; + exit $E_UNKNOWN; } # If user requested version info if ($opt{version}) { print $LICENSE; - exit $E_OK; + exit $E_UNKNOWN; } # Setting timeout @@ -775,7 +775,7 @@ # adjust the check hash if ($opt{only} eq 'chassis') { - map { $check{$_} = 1 } qw(memory fans power temp cpu voltage + map { $check{$_} = 1 } qw(memory fans power temp cpu voltage sdcard batteries amperage intrusion esmhealth); } else { @@ -868,6 +868,13 @@ # Workaround for Openmanage BUG introduced in OMSA 5.5.0 $rawtext =~ s{\n;}{;}gxms if $command eq 'storage controller'; + # Workaround for logical connectors where there are extra + # information that isn't possible to parse consistently. Remove + # everything after and including "Path Health" + if ($command =~ m{\A storage\sconnector}xms) { + $rawtext =~ s{Path\sHealth.*}{}xms; + } + # Report if no controllers found if ($command eq 'storage controller' and $rawtext =~ m{No\scontrollers\sfound}xms) { report('storage', 'Storage Error! No controllers found', $E_UNKNOWN); @@ -1093,7 +1100,7 @@ # This helper function returns the corresponding value of a hash key, # but takes into account that the key may not exist sub get_hashval { - my $key = shift || return undef; + my $key = shift || return; my $hash = shift; return defined $hash->{$key} ? $hash->{$key} : "Undefined value $key"; } @@ -1333,6 +1340,7 @@ my $media = undef; # media type (e.g. HDD, SSD) my $bus = undef; # bus protocol (e.g. SAS, SATA) my $spare = undef; # spare state (e.g. global hotspare) + my $cert = undef; # if drive is certified or not my @output = (); if ($snmp) { @@ -1352,6 +1360,7 @@ '1.3.6.1.4.1.674.10893.1.20.130.4.1.26' => 'arrayDiskNexusID', '1.3.6.1.4.1.674.10893.1.20.130.4.1.31' => 'arrayDiskSmartAlertIndication', '1.3.6.1.4.1.674.10893.1.20.130.4.1.35' => 'arrayDiskMediaType', + '1.3.6.1.4.1.674.10893.1.20.130.4.1.36' => 'arrayDiskDellCertified', '1.3.6.1.4.1.674.10893.1.20.130.5.1.7' => 'arrayDiskEnclosureConnectionControllerNumber', '1.3.6.1.4.1.674.10893.1.20.130.6.1.7' => 'arrayDiskChannelConnectionControllerNumber', ); @@ -1461,6 +1470,7 @@ $spare = get_hashval($out->{arrayDiskSpareState}, \%spare_state) || q{}; $bus = get_hashval($out->{arrayDiskBusType}, \%bus_type); $media = get_hashval($out->{arrayDiskMediaType}, \%media_type); + $cert = defined $out->{arrayDiskDellCertified} ? $out->{arrayDiskDellCertified} : 1; $capacity = exists $out->{arrayDiskLengthInMB} ? $out->{arrayDiskLengthInMB} * 1024**2 : -1; @@ -1491,12 +1501,19 @@ $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); $ctrl = $out->{ctrl}; $capacity = get_nonempty_string('Capacity', $out, q{}); $capacity =~ s{\A .*? \((\d+) \s bytes\) \z}{$1}xms; if ($capacity eq 'Unavailable') { $capacity = -1; } + if ($cert eq 'Yes' or $cert eq 'Not Applicable') { + $cert = 1; + } + else { + $cert = 0; + } } $count{pdisk}++; @@ -1554,6 +1571,19 @@ $name, $vendor, $product, $capacity, $ctrl, $state, $progr; report('storage', $msg, $E_WARNING, $nexus); } + # 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); + } + 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); + } + } # Default elsif ($status ne 'Ok') { my $msg = sprintf '%s [%s %s, %s] on ctrl %d needs attention: %s', @@ -2840,17 +2870,11 @@ $count{fan}++; next FAN if blacklisted('fan', $index); - if ($status ne 'Ok') { - my $msg = sprintf 'Chassis fan %d [%s] needs attention: %s', - $index, $location, $status; - my $err = $snmp ? $probestatus2nagios{$status} : $status2nagios{$status}; - report('chassis', $msg, $err, $index); - } - else { - my $msg = sprintf 'Chassis fan %d [%s]: %s', - $index, $location, $reading; - report('chassis', $msg, $E_OK, $index); - } + # Default + my $msg = sprintf 'Chassis fan %d [%s] reading: %s RPM', + $index, $location, $reading; + my $err = $snmp ? $probestatus2nagios{$status} : $status2nagios{$status}; + report('chassis', $msg, $err, $index); # Collect performance data if (defined $opt{perfdata}) { @@ -4870,8 +4894,15 @@ print join $lb, map { "$_->{$type}=$_->{value};$_->{warn};$_->{crit}" } sort perfsort @perfdata; } -# Print a linebreak at the end -print "\n" if !$opt{debug}; +# Wrapping up and finishing +if ($opt{debug}) { + # Exit with value 3 (unknown) if debug + exit $E_UNKNOWN; +} +else { + # Print a linebreak at the end if we have a TTY + isatty(*STDOUT) && print "\n"; -# Exit with proper exit code -exit $exit_code; + # Exit with proper exit code + exit $exit_code; +} | ||
[+] | Changed | check_openmanage-3.6.7.tar.bz2/check_openmanage.8 ^ |
@@ -1,15 +1,7 @@ -.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32 +.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.13) .\" .\" Standard preamble: .\" ======================================================================== -.de Sh \" Subsection heading -.br -.if t .Sp -.ne 5 -.PP -\fB\\$1\fR -.PP -.. .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp @@ -25,11 +17,11 @@ .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left -.\" double quote, and \*(R" will give a right double quote. | will give a -.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to -.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' -.\" expand to `' in nroff, nothing in troff, for use with C<>. -.tr \(*W-|\(bv\*(Tr +.\" double quote, and \*(R" will give a right double quote. \*(C+ will +.\" give a nicer C++. Capital omega is used to do unbreakable dashes and +.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, +.\" nothing in troff, for use with C<>. +.tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- @@ -48,22 +40,25 @@ . ds R" '' 'br\} .\" +.\" Escape single quotes in literal strings from groff's Unicode transform. +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" .\" If the F register is turned on, we'll generate index entries on stderr for -.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index +.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. -.if \nF \{\ +.ie \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} -.\" -.\" For nroff, turn off justification. Always turn off hyphenation; it makes -.\" way too many mistakes in technical documents. -.hy 0 -.if n .na +.el \{\ +. de IX +.. +.\} .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. @@ -129,7 +124,11 @@ .\" ======================================================================== .\" .IX Title "CHECK_OPENMANAGE 8" -.TH CHECK_OPENMANAGE 8 "2011-02-08" "check_openmanage 3.6.5" "Nagios plugin" +.TH CHECK_OPENMANAGE 8 "2011-04-28" "check_openmanage 3.6.6" "Nagios plugin" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.if n .ad l +.nh .SH "NAME" check_openmanage \- Nagios plugin for checking the hardware status on Dell servers running OpenManage @@ -255,7 +254,7 @@ country or area. Example for Germany: .Sp .Vb 1 -\& check_openmanage --htmlinfo de +\& check_openmanage \-\-htmlinfo de .Ve .Sp If this option is used together with either the \fI\-\-extinfo\fR or @@ -269,31 +268,40 @@ string. You can control the format with the following interpreted sequences: .RS 4 -.IP "\fB%m\fR" 4 +.ie n .IP "\fB\fB%m\fB\fR" 4 +.el .IP "\fB\f(CB%m\fB\fR" 4 .IX Item "%m" System model -.IP "\fB%s\fR" 4 +.ie n .IP "\fB\fB%s\fB\fR" 4 +.el .IP "\fB\f(CB%s\fB\fR" 4 .IX Item "%s" Service tag -.IP "\fB%b\fR" 4 +.ie n .IP "\fB\fB%b\fB\fR" 4 +.el .IP "\fB\f(CB%b\fB\fR" 4 .IX Item "%b" \&\s-1BIOS\s0 version -.IP "\fB%d\fR" 4 +.ie n .IP "\fB\fB%d\fB\fR" 4 +.el .IP "\fB\f(CB%d\fB\fR" 4 .IX Item "%d" \&\s-1BIOS\s0 release date -.IP "\fB%o\fR" 4 +.ie n .IP "\fB\fB%o\fB\fR" 4 +.el .IP "\fB\f(CB%o\fB\fR" 4 .IX Item "%o" Operating system name -.IP "\fB%r\fR" 4 +.ie n .IP "\fB\fB%r\fB\fR" 4 +.el .IP "\fB\f(CB%r\fB\fR" 4 .IX Item "%r" Operating system release -.IP "\fB%p\fR" 4 +.ie n .IP "\fB\fB%p\fB\fR" 4 +.el .IP "\fB\f(CB%p\fB\fR" 4 .IX Item "%p" Number of physical drives -.IP "\fB%l\fR" 4 +.ie n .IP "\fB\fB%l\fB\fR" 4 +.el .IP "\fB\f(CB%l\fB\fR" 4 .IX Item "%l" Number of logical drives -.IP "\fB%n\fR" 4 +.ie n .IP "\fB\fB%n\fB\fR" 4 +.el .IP "\fB\f(CB%n\fB\fR" 4 .IX Item "%n" Line break. Will be a regular line break if run from a \s-1TTY\s0, else an \&\s-1HTML\s0 line break. @@ -432,7 +440,7 @@ .IP "\-\-use\-get_table" 4 .IX Item "--use-get_table" This option exists as a workaround when using check_openmanage with -SNMPv3 on Windows with net\-snmp. Using this option will make +SNMPv3 on Windows with net-snmp. Using this option will make check_openmanage use the Net::SNMP function \fIget_table()\fR instead of \&\fIget_entries()\fR while fetching values via \s-1SNMP\s0. The latter is faster and is the default. | ||
Changed | check_openmanage-3.6.7.tar.bz2/check_openmanage.exe ^ | |
[+] | Changed | check_openmanage-3.6.7.tar.bz2/debian/changelog ^ |
@@ -1,3 +1,15 @@ +check-openmanage (3.6.7-1) unstable; urgency=low + + * New upstream release. + + -- Trond Hasle Amundsen <t.h.amundsen@usit.uio.no> Thu, 12 May 2011 12:56:07 +0200 + +check-openmanage (3.6.6-1) unstable; urgency=low + + * New upstream release. + + -- Trond Hasle Amundsen <t.h.amundsen@usit.uio.no> Thu, 28 Apr 2011 11:13:02 +0200 + check-openmanage (3.6.5-1) unstable; urgency=low * New upstream release. | ||
[+] | Changed | check_openmanage-3.6.7.tar.bz2/nagios-plugins-check-openmanage.spec ^ |
@@ -6,7 +6,7 @@ %global debug_package %{nil} Name: nagios-plugins-check-openmanage -Version: 3.6.5 +Version: 3.6.7 Release: 1%{?dist} Summary: Nagios plugin to monitor hardware health on Dell servers @@ -55,6 +55,12 @@ %changelog +* Thu May 12 2011 Trond H. Amundsen <t.h.amundsen@usit.uio.no> - 3.6.7-1 +- Version 3.6.7 + +* Thu Apr 28 2011 Trond H. Amundsen <t.h.amundsen@usit.uio.no> - 3.6.6-1 +- Version 3.6.6 + * Wed Feb 9 2011 Trond H. Amundsen <t.h.amundsen@usit.uio.no> - 3.6.5-1 - Version 3.6.5 |