glensc/nagios-plugin-check_raid — pull request #41 by elconas (2013-11-12 12:10:45+00:00)
Title: megacli: Fixed handling of multiple Virtual Drive without name

Example configuration where check_raid.pl did not work:

[root@SERVER:~]# MegaCli64 -LdInfo -Lall -aALL -NoLog

Adapter 0 -- Virtual Drive Information:
Virtual Drive: 0 (Target Id: 0)
Name :
RAID Level : Primary-1, Secondary-0, RAID Level Qualifier-0
Size : 135.972 GB
State : Optimal
Stripe Size : 128 KB
Number Of Drives : 2
Span Depth : 1
Default Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
Current Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
Access Policy : Read/Write
Disk Cache Policy : Disabled
Encryption Type : None

Virtual Drive: 1 (Target Id: 1)
Name :
RAID Level : Primary-1, Secondary-0, RAID Level Qualifier-0
Size : 135.972 GB
State : Optimal
Stripe Size : 128 KB
Number Of Drives : 2
Span Depth : 1
Default Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
Current Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
Access Policy : Read/Write
Disk Cache Policy : Disabled
Encryption Type : None

Virtual Drive: 2 (Target Id: 2)
Name :
RAID Level : Primary-1, Secondary-0, RAID Level Qualifier-0
Size : 135.972 GB
State : Optimal
Stripe Size : 128 KB
Number Of Drives : 2
Span Depth : 1
Default Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
Current Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
Access Policy : Read/Write
Disk Cache Policy : Disabled
Encryption Type : None

[root@SERVER:~]# /usr/local/nagios/libexec/check_raid.pl.ORG -p megacli
OK: megacli:[Volumes(1): NoName:Optimal; Devices(6): 11,10,09,08,12,13=Online]