Hi Martin, On Thursday 25 March 2010, Christoph Martin wrote: > Thanks for the last patch. There is another one: > > check_linux_raid should also warn if a md device is in resync mode > and not only if in recovory mode. > > *** /usr/lib/nagios/plugins/check_linux_raid.pl~ Fri Mar 19 12:06:24 > 2010 --- /usr/lib/nagios/plugins/check_linux_raid.pl Wed Mar 24 00:21:04 > 2010 *************** > *** 61,67 **** > if (defined $device) { > if (/(\[[_U]+\])/) { > $status{$device} = $1; > ! } elsif (/recovery = (.*?)\s/) { > $recovery{$device} = $1; > ($finish{$device}) = /finish=(.*?min)/; > $device=undef; > --- 61,67 ---- > if (defined $device) { > if (/(\[[_U]+\])/) { > $status{$device} = $1; > ! } elsif (/(recovery|resync) = (.*?)\s/) { > $recovery{$device} = $1; > ($finish{$device}) = /finish=(.*?min)/; > $device=undef;
I'm not very familiar with mdadm, but how does you patch help here? Once a month /etc/cron.d/mdadm is doing a resync. # cat /proc/mdstat Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] md1 : active raid1 sda3[0] sdb3[1] 133821376 blocks [2/2] [UU] [=====>...............] check = 29.6% (39666624/133821376) finish=24.1min speed=64932K/sec unused devices: <none> check_linux_raid is reporting "OK md1 status=[UU]." with and without of your patch. Under which conditions matches your regex? Do you have an example and when will this happen? Thanks and with kind regards, Jan. -- Never write mail to <w...@spamfalle.info>, you have been warned! -----BEGIN GEEK CODE BLOCK----- Version: 3.12 GIT d-- s+: a C+++ UL++++ P+ L+++ E--- W+++ N+++ o++ K++ w--- O M V- PS PE Y++ PGP++ t-- 5 X R tv- b+ DI D+ G++ e++ h---- r+++ y++++ ------END GEEK CODE BLOCK------
signature.asc
Description: This is a digitally signed message part.