[Nagiosplug-devel] [ nagiosplug-Patches-1338298 ] check_linux_raid plugin does not recognize recovery

SourceForge.net noreply at sourceforge.net
Wed Oct 26 03:11:44 UTC 2005


Patches item #1338298, was opened at 2005-10-26 12:09
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397599&aid=1338298&group_id=29880

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Bugfix
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Bastiaan Bakker (bastiaan)
Assigned to: Nobody/Anonymous (nobody)
Summary: check_linux_raid plugin does not recognize recovery

Initial Comment:
The check_linux_raid plugin does not properly parse
/proc/mdstat, causing it to report CRITICAL status for
RAID devices that are already recovering. For example
it reports CRITICAL for the following /proc/mdstat
(taken from a CentOS 3.5 box):

Personalities : [raid1]
read_ahead 1024 sectors
Event: 8
md0 : active raid1 sdb1[2] sda1[1]
      2097024 blocks [2/1] [_U]
      [>....................]  recovery =  0.4%
(10168/2097024) finish=23.8min speed=1452K/sec
unused devices: <none>

The attached patch fixes two bugs which cause this problem:
1) do not stop parsing after [_U] but until the next
mdX entry begins, so we won't miss the 'recovery line'
2) allow two or more spaces after 'recovery ='  in
order to recognize single digit percentages

Other modifications:
1) Addition of 'speed=' to the output:
WARNING md0 status=[_U], recovery=0.4%, finish=23.8min,
speed=1452K/sec
2) Addition of optionally specification of mdstat file
as second command line parameter. Primarily useful for
debugging.




----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397599&aid=1338298&group_id=29880




More information about the Nagiosplugin-devel mailing list