[Nagiosplug-devel] new Plugin CheckRaid

Jag agrajag at dragaera.net
Thu Mar 4 06:54:11 CET 2004


On Thu, 2004-03-04 at 08:26, Björn Teipel wrote:
> Hi all,
> 
> I`ve written a tiny Perl script which checks the status of software 
> Raids under Linux using /proc/mdstat
> It has been tested with RAID1 devices and worked fine, does someone has 
> RAID0,5 or other Raids and
> can test this script ?

Thanks for writing this.  It looks promising.  However, the status line
is a bit spammy.  Here's what it looks like on my system with three
RAID1's and one RAID5:

[sean at cstore1 sean]$ ./check_Raid.pl
Loaded RAID drivers [raid1 raid5]<br>md0
[active,raid1,sda1(UP),sdb1(UP)]<br>md1
[active,raid1,sda3(UP),sdb3(UP)]<br>md3
[active,raid1,sda4(UP),sdb4(UP)]<br>md2
[active,raid5,sdc1(UP),sdd1(UP),sde1(UP),sdf1(UP),sdg1(UP),sdh1(UP),sdi1(UP),sdj1(UP)][sean at cstore1 sean]$

(Everything after the command was on one line, although my mail client
is wanting to break it up.)

If you look in the contrib part of the nagios-plugins download, you'll
see that there's another plugin to do something similar.  However, its
designed to only check on RAID device at a time, and it is somewhat
broken.  It doesn't have a break in its loop of reading through
/proc/mdstat, so it ends up giving you info on the last device listed,
even if that's not what you wanted.

I think a combination of the two scripts would be nice.  One thing I do
like about the other one is it uses the "[UUUUUUUU]" straight out of
/proc/mdstat.  This gives a very good idea of that status of the raid in
very little space.






More information about the Devel mailing list