[Pkg-nagios-devel] Bug#574612: nagios-plugins-standard: check_linux_raid does not detect recovery

Christoph Martin martin at uni-mainz.de
Fri Mar 19 11:21:18 UTC 2010


Package: nagios-plugins-standard
Version: 1.4.12-5
Severity: normal


If you have a status like the following:

# cat /proc/mdstat 
Personalities : [raid1] [raid6] 
md2 : active raid1 sdx1[1] sdw1[0]
      316270016 blocks [2/2] [UU]
      
md1 : active raid6 sdz1[10] sdaj1[9] sdai1[8] sdah1[7] sdag1[6] sdaf1[11](F) sdae1[4] sdad1[3] sdac1[2] sdab1[1] sdaa1[0]
      2530107904 blocks level 6, 64k chunk, algorithm 2 [10/9] [UUUUU_UUUU]
      [=============>.......]  recovery = 66.4% (210085844/316263488) finish=324.8min speed=5446K/sec
md3 : active raid6 sdat1[9] sdas1[8] sdar1[7] sdaq1[6] sdap1[5] sdao1[4] sdan1[3] sdam1[2] sdal1[1] sdak1[0]
      2421884416 blocks level 6, 16k chunk, algorithm 2 [10/10] [UUUUUUUUUU]
      
md4 : active raid6 sdbd1[9] sdbc1[8] sdbb1[7] sdba1[6] sdaz1[5] sday1[4] sdax1[3] sdaw1[2] sdav1[1] sdau1[0]
      2421884416 blocks level 6, 16k chunk, algorithm 2 [10/10] [UUUUUUUUUU]
      
md0 : active raid6 sdy1[4] sdv1[9] sdu1[8] sdt1[7] sds1[6] sdr1[5] sdp1[3] sdo1[2] sdn1[1] sdm1[0]
      2530107904 blocks level 6, 64k chunk, algorithm 2 [10/10] [UUUUUUUUUU]
      
unused devices: <none>

check_linux_raid will return no Warning state but Ok state. This is
because the script wants to see an empty line after each md block,
which is not the case if a recovery is running.

Here is a patch to fix this:

*** /usr/lib/nagios/plugins/check_linux_raid~        Wed Nov 25 12:11:58 2009
--- /usr/lib/nagios/plugins/check_linux_raid Fri Mar 19 12:06:24 2010
***************
*** 64,69 ****
--- 64,70 ----
                        } elsif (/recovery = (.*?)\s/) {  
                                $recovery{$device} = $1;
                                ($finish{$device}) = /finish=(.*?min)/;
+                               $device=undef;
                        } elsif (/^\s*$/) {
                                $device=undef;
                        }

Christoph

-- System Information:
Debian Release: 5.0.4
  APT prefers stable
  APT policy: (900, 'stable'), (90, 'oldstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-2-686-bigmem (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash

Versions of packages nagios-plugins-standard depends on:
ii  dnsutils        1:9.5.1.dfsg.P3-1+lenny1 Clients provided with BIND
ii  fping           2.4b2-to-ipv6-15         sends ICMP ECHO_REQUEST packets to
ii  host            20000331-9               utility for querying DNS servers
ii  libc6           2.7-18lenny2             GNU C Library: Shared libraries
ii  libldap-2.4-2   2.4.11-1+lenny1          OpenLDAP libraries
ii  libmysqlclient1 5.0.51a-24+lenny3        MySQL database client library
ii  libnet-snmp-per 5.2.0-1                  Script SNMP connections
ii  libpq5          8.3.9-0lenny1            PostgreSQL C client library
ii  libradiusclient 0.5.5-1                  Enhanced RADIUS client library
ii  nagios-plugins- 1.4.12-5                 Plugins for the nagios network mon
ii  qstat           2.11-1                   Command-line tool for querying qua
ii  radiusclient1   0.3.2-11.1               /bin/login replacement which uses 
ii  smbclient       2:3.2.5-4lenny9          a LanManager-like simple client fo
ii  snmp            5.4.1~dfsg-12            SNMP (Simple Network Management Pr
ii  ucf             3.0016                   Update Configuration File: preserv

nagios-plugins-standard recommends no packages.

Versions of packages nagios-plugins-standard suggests:
pn  nagios3                       <none>     (no description available)
pn  whois                         <none>     (no description available)

-- no debconf information





More information about the Pkg-nagios-devel mailing list