Package: nagios-plugins-contrib Version: 4.20120702~bpo60+1 Severity: normal Tags: patch
The code of check_raid contains an obvious bug in trying to do a string-compare on a regexp. In /usr/lib/nagios/plugins/check_raid check_tw_cli(), line 738: } elsif ($s eq 'INITIALIZING|VERIFYING') { The effect is that both status (INITIALIZING and VERIFYING) will not be recognized and be reported as UNKNOWN. Also the VERIFYING state will happen as part of a normal operation. That is especially true if the auto-verification feature is enabled. To avoid noise this state should be classified as OK. Here is a patch for the issue: --- ./check_raid 2012-08-02 23:20:41.000000000 +0200 +++ ./check_raid_patched 2012-10-01 11:40:44.000000000 +0200 @@ -732,10 +732,10 @@ while (<$fh>) { next unless (my($u, $s, $p, $p2) = /^(u\d+)\s+\S+\s+(\S+)\s+(\S+)\s+(\S+)/); - if ($s eq 'OK') { + if ($s =~ m{ \A OK|VERIFYING \z }xms) { push(@cstatus, "$u:$s"); - } elsif ($s eq 'INITIALIZING|VERIFYING') { + } elsif ($s eq 'INITIALIZING') { $status = $ERRORS{WARNING} unless $status; push(@cstatus, "$u:$s $p2"); -- System Information: Debian Release: 6.0.6 APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 2.6.32-5-amd64 (SMP w/4 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash nagios-plugins-contrib depends on no packages. Versions of packages nagios-plugins-contrib recommends: ii freeipmi-tools 0.7.17~beta2-1 GNU implementation of the IPMI pro ii libc6 2.11.3-4 Embedded GNU C Library: Shared lib ii libdate-manip-perl 6.11-1 module for manipulating dates ii libio-socket-ssl-perl 1.33-1+squeeze1 Perl module implementing object or ii libipc-run-perl 0.89-1 Perl module for running processes ii liblocale-gettext-perl 1.05-6 Using libc functions for internati ii liblwp-useragent-deter 1.04-1 LWP useragent that retries errors ii libmail-imapclient-per 3.25-1 Perl library for manipulating IMAP ii libmemcached5 0.40-1 A C and C++ client library to the ii libnagios-plugin-perl 0.34-1 family of perl modules to streamli ii libnet-dns-perl 0.66-2 Perform DNS queries from a Perl sc ii libnet-smtp-tls-perl 0.12-1 Perl SMTP client library supportin ii libnet-snmp-perl 5.2.0-4 Script SNMP connections ii libnet-ssleay-perl 1.36-1 Perl module for Secure Sockets Lay ii libreadonly-perl 1.03-2 Facility for creating read-only sc ii libyaml-syck-perl 1.12-1 Perl module providing a fast, ligh ii lsof 4.81.dfsg.1-1 List open files ii openssl 0.9.8o-4squeeze13 Secure Socket Layer (SSL) binary a ii ruby 4.5 An interpreter of object-oriented ii snmp 5.4.3~dfsg-2 SNMP (Simple Network Management Pr Versions of packages nagios-plugins-contrib suggests: ii backuppc 3.1.0-9.1 high-performance, enterprise-grade pn cciss-vol-status <none> (no description available) pn expect <none> (no description available) pn mpt-status <none> (no description available) pn perl-doc <none> (no description available) -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org