Giter Site home page Giter Site logo

glensc / nagios-plugin-check_raid Goto Github PK

View Code? Open in Web Editor NEW
143.0 19.0 84.0 1.71 MB

Nagios/Icinga/Sensu plugin to check current server's RAID status ⛺

Makefile 1.71% Perl 78.20% Shell 0.04% Roff 20.05%
nagios raid nagios-plugin icinga icinga-plugin sensu sensu-plugin monitoring

nagios-plugin-check_raid's Introduction

Nagios/Icinga/Sensu plugin to check current server's RAID status

This plugin checks all RAID volumes (hardware and software) that can be identified.

While written originally for Nagios, it's known to work also with:

This is supposed to be a general plugin to run via NRPE. It checks for the various RAID systems, and verifies they are working correctly.

Some checks require root permission, that is acomplished using sudo. Neccessary sudo rules (detected for your system), can be installed when check_raid is invoked with -S argument. You need to be root user and it will add required lines to the sudo config file.

Test suite

Reporting bugs

IMPORTANT: See CONTRIBUTING.md what is needed for your reported Issue to be worked on or Pull Request to be accepted.

Failure to do so means I will just have to ignore your Issue or Pull Request and will eventually close with no resolution. Currently there are too many of such tickets.

Installing

Download latest release from releases page

next step would be to setup system sudo rules:

./check_raid.pl -S

run with -d to preview the sudo rules.

Plugin should be ready to be run:

./check_raid.pl

for some RAIDs there's need to install extra tools, see Supported RAIDs

Development

To obtain latest development version of the plugin source, grab tarball or do a git checkout:

git clone --depth=8 https://github.com/glensc/nagios-plugin-check_raid

to build self-contained fatpacked check_raid.pl, invoke make pack, otherwise use check_raid.sh in project root to run the plugin in source tree.

Usage

./check_raid.pl [-p|--plugin <name>] [-w|--warnonly]
./check_raid.pl -S
./check_raid.pl -l

Command line arguments

-V  --version           Print check_raid version
-d                      Produce some debug output
-S  --sudoers           Configure /etc/sudoers file
-W  --warnonly          Don't send CRITICAL status
-p  --plugin <name(s)>  Force the use of selected plugins, comma separated
    --noraid=STATE      Set status as STATE if RAID volumes are not found. Defaults to `UNKNOWN`
    --resync=STATE      Set status as STATE if RAID is in resync state. Defaults to `WARNING`
    --check=STATE       Set status as STATE if RAID is in check state. Defaults to `OK`
    --cache-fail=STATE  Set status as STATE if Write Cache is present but disabled. Defaults to `WARNING`
    --bbulearn=STATE    Return STATE if Backup Battery Unit (BBU) learning cycle is in progress. Defaults to `WARNING`
    --bbu-monitoring    Enable experimental monitoring of the BBU status
-l  --list-plugins      Lists active plugins

STATE can be one of: OK, WARNING, CRITICAL, UNKNOWN

Supported RAIDs

Supported RAIDs that can be checked:

  • Adaptec AAC RAID via aaccli or afacli or arcconf
  • AIX software RAID via lsvg
  • HP/Compaq Smart Array via cciss_vol_status (hpsa supported too)
  • HP Smart Array Controllers and MSA Controllers with hpacucli, hpssacli, ssacli
  • HP Smart Array (MSA1500) via serial line
  • Linux 3ware SATA RAID via tw_cli
  • Linux Device Mapper RAID via dmraid
  • Linux DPT/I2O hardware RAID controllers via /proc/scsi/dpt_i2o
  • Linux GDTH hardware RAID controllers via /proc/scsi/gdth
  • Linux LSI MegaRaid hardware RAID via CmdTool2
  • Linux LSI MegaRaid hardware RAID via megarc
  • Linux LSI MegaRaid hardware RAID via /proc/megaraid
  • Linux Device Mapper
  • Linux MegaIDE hardware RAID controllers via /proc/megaide
  • Linux MPT hardware RAID via mpt-status
  • Linux software RAID (md) via /proc/mdstat
  • LSI Logic MegaRAID SAS series via MegaCli
  • LSI MegaRaid via lsraid
  • Serveraid IPS via ipssend
  • Solaris software RAID via metastat

You might need to install following tools depending on your raid:

Project entry in Nagios Exchange: http://exchange.nagios.org/directory/Plugins/Hardware/Storage-Systems/RAID-Controllers/check_raid/details

Copyright

License: GPL v2

(c) 2004-2006 Steve Shipway (code up to version 2.1), university of auckland, http://www.steveshipway.org/forum/viewtopic.php?f=20&t=417&p=3211 Steve Shipway Thanks M Carmier for megaraid section.

(c) 2009-2019 Elan Ruusamäe [email protected] (maintainer from version 2.1 and upwards)

nagios-plugin-check_raid's People

Contributors

ashark avatar bebehei avatar boesing avatar bootc avatar bzed avatar carnil avatar chschenk avatar csware avatar feraudet avatar glensc avatar henkjan avatar ixs avatar jleroy avatar knorrie avatar kurita0 avatar lausser avatar matthieudri avatar meanphil avatar mshirley avatar noblemtw avatar odenbach avatar phsm avatar robbat2 avatar roeme avatar roock avatar sarahsmithbbc avatar saz avatar tongpu avatar torrentalle avatar uplink avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nagios-plugin-check_raid's Issues

Present hot spares will cause CRITICAL with arcconf 1.5 / 6405

(Related to #66.)
If there are any disks that are reported as "Global Hot-Spares", check_raid will push a CRITICAL state. Observed with version 3.0.5 in conjunction with arcconf 1.5 talking to a 6405 controller.

The bug is still present with 3.0.6. As this isn't released yet, we've ported a small patch against 3.0.5 to 3.0.6 and will soon submit a PR fixing this issue.

MegaCli, send Warning status on predictive failure for physical discs

With the following PDlist output, the disc beeing ONLINE, no error/warning is sent 👍

Enclosure Device ID: 252
Slot Number: 5
Device Id: 14
Sequence Number: 4
Media Error Count: 94
Other Error Count: 11
Predictive Failure Count: 1
Last Predictive Failure Event Seq Number: 28713
PD Type: SAS
Raw Size: 279.396 GB [0x22ecb25c Sectors]
Non Coerced Size: 278.896 GB [0x22dcb25c Sectors]
Coerced Size: 278.464 GB [0x22cee000 Sectors]
Firmware state: Online
SAS Address(0): 0x5000c50016c859cd
SAS Address(1): 0x0
Connected Port Number: 5(path0)
Inquiry Data: IBM-ESXSST9300603SS   F B53B3SE0WJ1Y0825B53B
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Foreign State: None
Device Speed: Unknown
Link Speed: Unknown
Media Type: Hard Disk Device

Could a warning been rised if "Predictive Failure Count:" is not 0 ?

Thanks for this script. It made my day

cciss issue

Hello,

When running the latest version of check_raid (commit 1ddda01 at the moment of writing) I get the following error:

open failed: /proc/scsi/cciss/cciss0: No such file or directory at ./check_raid.pl line 2903

This was tested on three systems, all of them having healthy arrays:

  • HP ProLiant DL380 G5 - Debian 6 (2.6.32-5-amd64)
  • HP ProLiant DL120 G7 - Debian 6 (2.6.32-5-amd64)
  • HP ProLiant DL380 G4 - CentOS 6 (OpenVZ kernel 2.6.32-042stab055.16)

After some digging through the code, I noticed that the cciss plugin checks for /proc/scsi/cciss/$controller, where $controller is cciss0 in my case.
In the first place, there was no /proc/scsi/cciss folder on any of the three machines. After reading the cciss module documentation at http://www.kernel.org/doc/Documentation/blockdev/cciss.txt and running:

echo "engage scsi" > /proc/driver/cciss/cciss0

I got the /proc/scsi/cciss folder but it doesn't contain the cciss0 that the plugin expects to find. Instead, I have the following files (their contents in parentheses):

  • HP ProLiant DL380 G5 - /proc/scsi/cciss/2 (cciss0: SCSI host: 2)
  • HP ProLiant DL120 G7 - /proc/scsi/cciss/4 (cciss0: SCSI host: 4)
  • HP ProLiant DL380 G4 - /proc/scsi/cciss/2 (cciss0: SCSI host: 2)

As far as I see, this behaviour was introduced during the big code rewrite, last summer (commit 0dfef2a).

I want to debug this, but I don't know what was the expected behaviour of the code which tries to read /proc/scsi/cciss/$controller

Thank you!

megacli: Warning since 3.2.1

Since updating to 3.2.1 I've problems on an Dell PERC 6/i Integrated RAID Controller:

$ ./check_raid -V
check_raid Version 3.2.0
$ ./check_raid
OK: megacli:[Volumes(1): Virtual:Optimal; Devices(2): 00,01=Online]
$ /usr/lib/nagios/plugins/check_raid -V
check_raid Version 3.2.1
$ /usr/lib/nagios/plugins/check_raid
WARNING: megacli:[Volumes(1): Virtual:Optimal; Devices(2): 00,01=Online]
$ /usr/lib/nagios/plugins/check_raid -d
DEBUG EXEC: /usr/sbin/megacli -PDList -aALL -NoLog at /usr/lib/nagios/plugins/check_raid line 435.
DEBUG EXEC: /usr/sbin/megacli -LdInfo -Lall -aALL -NoLog at /usr/lib/nagios/plugins/check_raid line 435.
WARNING: megacli:[Volumes(1): Virtual:Optimal; Devices(2): 00,01=Online]
$ /usr/sbin/megacli -PDList -aALL -NoLog

Adapter #0

Enclosure Device ID: 32
Slot Number: 0
Drive's position: DiskGroup: 0, Span: 0, Arm: 0
Enclosure position: N/A
Device Id: 0
WWN: 
Sequence Number: 2
Media Error Count: 0
Other Error Count: 16548
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SATA

Raw Size: 931.512 GB [0x74706db0 Sectors]
Non Coerced Size: 931.012 GB [0x74606db0 Sectors]
Coerced Size: 931.0 GB [0x74600000 Sectors]
Sector Size:  0
Firmware state: Online, Spun Up
Device Firmware Level: 1V02
Shield Counter: 0
Successful diagnostics completion on :  N/A
SAS Address(0): 0x1221000000000000
Connected Port Number: 0(path0) 
Inquiry Data:      WD-WMAW30959975WDC WD1003FBYX-01Y7B1                   01.01V02
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None 
Device Speed: Unknown 
Link Speed: Unknown 
Media Type: Hard Disk Device
Drive Temperature : N/A
PI Eligibility:  No 
Drive is formatted for PI information:  No
PI: No PI
Port-0 :
Port status: Active
Port's Linkspeed: Unknown 
Drive has flagged a S.M.A.R.T alert : No



Enclosure Device ID: 32
Slot Number: 1
Drive's position: DiskGroup: 0, Span: 0, Arm: 1
Enclosure position: N/A
Device Id: 1
WWN: 
Sequence Number: 2
Media Error Count: 0
Other Error Count: 16548
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SATA

Raw Size: 931.512 GB [0x74706db0 Sectors]
Non Coerced Size: 931.012 GB [0x74606db0 Sectors]
Coerced Size: 931.0 GB [0x74600000 Sectors]
Sector Size:  0
Firmware state: Online, Spun Up
Device Firmware Level: 1V02
Shield Counter: 0
Successful diagnostics completion on :  N/A
SAS Address(0): 0x1221000001000000
Connected Port Number: 1(path0) 
Inquiry Data:      WD-WMAW31292255WDC WD1003FBYX-01Y7B1                   01.01V02
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None 
Device Speed: Unknown 
Link Speed: Unknown 
Media Type: Hard Disk Device
Drive Temperature : N/A
PI Eligibility:  No 
Drive is formatted for PI information:  No
PI: No PI
Port-0 :
Port status: Active
Port's Linkspeed: Unknown 
Drive has flagged a S.M.A.R.T alert : No




Exit Code: 0x00
$ /usr/sbin/megacli -LdInfo -Lall -aALL -NoLog


Adapter 0 -- Virtual Drive Information:
Virtual Drive: 0 (Target Id: 0)
Name                :Virtual Disk 0
RAID Level          : Primary-1, Secondary-0, RAID Level Qualifier-0
Size                : 931.0 GB
Sector Size         : 512
Mirror Data         : 931.0 GB
State               : Optimal
Strip Size          : 64 KB
Number Of Drives    : 2
Span Depth          : 1
Default Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
Current Cache Policy: WriteThrough, ReadAheadNone, Direct, No Write Cache if Bad BBU
Default Access Policy: Read/Write
Current Access Policy: Read/Write
Disk Cache Policy   : Disk's Default
Encryption Type     : None
Is VD Cached: No



Exit Code: 0x00

Many thanks.

sudo entry requires !requiretty

Without it error is produced "sudo: sorry, you must have a tty to run sudo"

User_Alias CHECK_RAID=user
Defaults:CHECK_RAID   !requiretty
CHECK_RAID ALL=(root) NOPASSWD: /usr/sbin/arcconf GETSTATUS 1
CHECK_RAID ALL=(root) NOPASSWD: /usr/sbin/arcconf GETCONFIG 1 AL

Latest GIT won't detect Marvell RAID via lsscsi

sloeuillet@Domicile:~/Marvell_Raid$ uname -a
Linux Domicile 3.16.0-26-generic #34-Ubuntu SMP Wed Nov 26 15:58:47 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

sloeuillet@Domicile:~/Marvell_Raid$ lspci | grep -i marvell
01:00.0 SATA controller: Marvell Technology Group Ltd. 88SE9123 PCIe SATA 6.0 Gb/s controller (rev 11)

sloeuillet@Domicile:~/Marvell_Raid$ dmesg | grep -i marvell
[    1.275819] ata14.00: ATAPI: MARVELL VIRTUALL, 1.09, max UDMA/66
[    1.289868] ata7.00: ATA-7: MARVELL Raid VD 0, MV.R00-0, max UDMA7
[    3.333036] scsi 6:0:0:0: Direct-Access     ATA      MARVELL Raid VD  00-0 PQ: 0 ANSI: 5
[    3.333746] scsi 13:0:0:0: Processor         Marvell  91xx Config      1.01 PQ: 0 ANSI: 5

sloeuillet@Domicile:~/Marvell_Raid$ lsscsi -g
[0:0:0:0]    disk    ATA      WDC WD8000AARS-0 0A80  /dev/sda   /dev/sg0 
[2:0:0:0]    disk    ATA      WDC WD8000AARS-0 0A80  /dev/sdb   /dev/sg1 
[5:0:0:0]    cd/dvd  SAMSUNG  DVDWBD SH-B083L  SB01  /dev/sr0   /dev/sg2 
[6:0:0:0]    disk    ATA      MARVELL Raid VD  00-0  /dev/sdc   /dev/sg3 
[13:0:0:0]   process Marvell  91xx Config      1.01  -          /dev/sg4 

As you see, there are 2 SCSI devices : 6:0:0:0 which is the VirtualDisk (type=disk) and 13:0:0:0 which is a control device for the RAID array.

"No RAID configuration found" when running as nrpe user

Hello,

I've got a problem while calling the "check_raid.pl" script as "nrpe" user (e.g. from my Icinga Server). When running the script as "root" on a host, everything works fine. My RAID controller is a "LSI MegaRAID SAS 9271-4i".

[root@host plugins]# ./check_raid.pl
OK: megacli:[Volumes(2): DISK0.0:Optimal,CacheCade_2:Optimal; Devices(6): 09,10,07,08,05,06=Online]

When calling the script via NRPE from my Icinga Server "No RAID configuration found (...)" occurs:

[root@icinga plugins]# ./check_nrpe -H host -c check_raid
No RAID configuration found (tried: lsscsi, mdstat, megacli, ips, aaccli, afacli, mpt, gdth, dpt_i2o, tw_cli, arcconf, megarc, cmdtool2, cciss, sas2ircu, hpacucli, areca, dmraid)

On my host I've added a sudoers file for NRPE user with the following content. I've copied these lines from the "check_raid.pl -S" call and adopted them to my setup.

Defaults:nrpe !requiretty

nrpe ALL=(ALL) NOPASSWD:/usr/sbin/smartctl
nrpe ALL=(ALL) NOPASSWD:/root/bin/megacli *
nrpe ALL=(ALL) NOPASSWD:/root/bin/megacli -PDList -aALL -NoLog
nrpe ALL=(ALL) NOPASSWD:/root/bin/megacli -LdInfo -Lall -aALL -NoLog
nrpe ALL=(ALL) NOPASSWD:/root/bin/megacli -AdpBbuCmd -GetBbuStatus -aALL -NoLog

The "smartctl" check works fine via NRPE.

Please let me know if you need further information ...

Best regards,
Mathias

Unparsed Physical Device data

Hi, I have this output:

./check_raid.pl -p arcconf
Unparsed Physical Device data: [         Failed logical device segments     : True] at ./check_raid.pl line 2660, <$fh> line 129.
CRITICAL: arcconf:[Controller:Optimal, ZMM Status: ZMM Optimal, Logical Device 0(Device 0):Degraded, Drives: 0000000011140305A738,0000000011140305A808,MK0371YHHS35GA,MK0371YHHRWGTA,MK0371YHHS2G3A,MK0371YHHS2KTA,MK0371YHHRP15A,MK0371YHHRBHTA,MK0371YHHS088A,MK0371YHHRWG8A,MK0371YHHS0MJA,MK0371YHHRWSTA,MK0371YHHRZEAA,MK0371YHHS34ZA=Online]
Device #2
        Device is a Hard drive
        State                              : Online
        Failed logical device segments     : True
        Supported                          : Yes
        Transfer Speed                     : SATA 6.0 Gb/s
        Reported Channel,Device(T:L)       : 0,12(12:0)
        Reported Location                  : Enclosure 0, Slot 4
        Reported ESD(T:L)                  : 2,0(0:0)
        Vendor                             : Hitachi
        Model                              : HUA723030ALA640
        Firmware                           : MKAOA800
        Serial number                      : MK0371YHHS35GA
        Size                               : 2861588 MB
        Write Cache                        : Enabled (write-back)
        FRU                                : None
        S.M.A.R.T.                         : Yes
        S.M.A.R.T. warnings                : 52
        Power State                        : Full rpm
        Supported Power States             : Full rpm,Powered off,Reduced rpm
        SSD                                : No
        MaxCache Capable                   : No
        MaxCache Assigned                  : No
        NCQ status                         : Enabled

Regards

arcconf and Adaptec 5805

We recently upgraded the firmware on this RAID controller to the following:

| UCLI | Adaptec by PMC uniform command line interface
| UCLI | Version 7.31 (B18856)
| UCLI | (C) Adaptec by PMC 2003-2011
| UCLI | All Rights Reserved

And as a result the nagios check_raid plugin is not working. The python code is expecting something different:

Traceback (most recent call last):
File "./check_raid_arc_old", line 18, in ?
k,v = line.split(':')
ValueError: too many values to unpack

Which is fixed by changing line 18 to:
k,v = line.split(':',1)

With that fixed, the script will no longer run as nagios on the server with the RAID controller:

-sh-3.2$ /usr/lib64/nagios/plugins/check_raid_arc
ERROR: Invalid response code from command /usr/StorMan/arcconf getconfig 1 LD (Controllers found: 0
Invalid controller number.)

Nor will it run from the Nagios monitoring server:
[root@m1ch nagios]# /usr/lib64/nagios/plugins/check_nrpe -H x.x.x.x -c check_raid
ERROR: Invalid response code from command /usr/StorMan/arcconf getconfig 1 LD (Controllers found: 0
Invalid controller number.)

UcliEvt.log shows:
Wed Nov 20 09:35:25 2013 /usr/StorMan/arcconf getconfig 1 LD
Wed Nov 20 09:35:25 2013 Status: invalid adapter, ReturnCode: 0x6

It runs fine as root on the monitoring server

Here is what we are running on the server with the RAID:
nagios-nrpe.x86_64 2.14-1.el5.rf
nagios-plugins.x86_64 1.4.16-1.el5.rf

And on the nagios monitoring server:
nagios.x86_64 3.2.3-3.el5.rf installed
nagios-nrpe.x86_64 2.14-1.el5.rf installed
nagios-plugins.x86_64 1.4.16-1.el5.rf installed
nagios-plugins-nrpe.x86_64 2.14-1.el5.rf installed

msa1500 serial line check not working

Hi.
If msa1500 isn't connected via fc (serial only), check doesn't work.

We have standalone nagios machine, that have attached to msa1500 directly with com port only.
But this machine doesn't connected to it via fc, so it nothing know about it's volumes via fc and /sys/block/*/device/model.
I suppose there is sense add key forces ttyS0 checking for msa1500.
As option cool to add option for other than ttyS0, when working via usb2com it can be ttyUSB0 etc.

areca check doesn’t work correctly while rebuilding

Hi.

This is still from version 2.2,.. but as long as I don’t know how to modify 3.0 in order to use sudo with -u and/or -g ... I can’t test it... and I guess it still happens there.

I just found the following:
When e.g. two disks of a RAID 6 failed... and only one is replaced... then
cli64 rsf info goes into "rebuilding"... which at least version 2.2 seems to take as status "OK".
But there's still one failed disk in the output of cli64 disk info... which is "ignored".

Cheers,
Chris.

MegaCLI (and possibly others?) report an OK though nothing has actually been checked

Hi.

As I already noted before in a private email, it seems to be true that (at least) MegaCLI reports an OK back to check_nagios (and this in turn to Nagios) even though nothing has been checked at all.
Given the nature of the plugin, this can be quite disastrous.

Example:

$ sudo /opt/MegaRAID/MegaCli/MegaCli64 -PDList -aALL -NoLog

Exit Code: 0x00

(no sudo rules are in place)
The plugin even gives an exit code of 0.

Guess we should add conditions that if nothing has matched at all, a CRITICAL is given back.

For sas2ircu, we should probably add checks

  • whether the last output line is "^SAS2IRCU: Utility Completed Successfully.$"
  • whether the line before is "SAS2IRCU: Command STATUS Completed Successfully." in case the STATUS command was used (there is no similar thing for the LIST command).

I guess other tools might be affected, too.

Cheers,
Chris.

Add check for WriteThrough

Hi

First of all thanks for the great check! Nice work on it.

Now recently we had some RAID controllers doing funky. The BBU reported no issues with the 'AdpBbuCmd', but -LDInfo reported:

Default Cache Policy: WriteBack, ReadAheadNone, Cached, No Write Cache if Bad BBU
Current Cache Policy: WriteThrough, ReadAheadNone, Cached, No Write Cache if Bad BBU

It would be nice if the check_raid also reported if the Logical Volume is running in WriteThrough.
Would it be possible to add this?

Thanks!

invoke sudo only with -g root and not (implicitly) with -u root

Hi.

For many check binaries, it may be possible to run them as normal user (the one invoking check_raid) but only the root group added.

For those for which this is known, I'd suggest to change:

  • the invocation of sudo to include "-g root"
  • the sudoers Runas_Spec to be "(:root)".

This tightens things a bit more at least.

I tried it for sas2ircu and it seems to work there.

Cheers,
Chris.

arcconf not reporting dead disks and dropping a perl error

Using latest git version :

Use of uninitialized value $s[0] in join or string at /root/check_raid.pl line 314.
CRITICAL: arcconf:[Controller:Okay, Defunct drives:1, Offline drives:1, Critical drives:1, Logical Device 0(ARRAY01):Offline, Drives: =Defunct 9QJ40LQ5,9QJ3ZX84,9QJ3Y860,9QJ3ZX0D,9QJ3ZXZ4=Online]

Adaptec RAID5 / script returns CRITICAL (but should be OK)

This should return "OK", no?

# /usr/lib/nagios/plugins/check_raid.pl -d
DEBUG EXEC: /proc/mdstat at /usr/lib/nagios/plugins/check_raid.pl line 358.
DEBUG EXEC: /usr/local/bin/arcconf GETSTATUS 1 at /usr/lib/nagios/plugins/check_raid.pl line 358.
DEBUG EXEC: /usr/local/bin/arcconf GETCONFIG 1 AL at /usr/lib/nagios/plugins/check_raid.pl line 358.
CRITICAL: arcconf:[Controller:Optimal, Logical Device 0(plop):Optimal, Drives: Y2O483PAS,Y2O3MYTGS,Y2O3M8RGS=Online S1F02BSH=Online (JBOD)]

Fantastic work by the way!

areca check enhancements

Analogously as with SAS2IRCU, we should check the areca tool output for a closing line:
"GuiErrMsg<0x00>: Success."
and fail if that doesn't exist

add support for areca controllers

Hey Elan.

I'd like to see support for Areca controllers in check_raid.

If necessary, I can try to write some patches, but I'm really a bad Perl programmer (saying I'd hate it wouldn't come close to the truth ;-) )... so if it's easy for you,... than fine.

Official documentation for the tools (and the tools themselves can be found at:
http://www.areca.us/support/download/RaidCards/Documents/Manual_Spec/CLIManual.zip
http://www.areca.us/support/s_linux/cli/i386/cli32.zip
http://www.areca.us/support/s_linux/cli/x86_64/cli64.zip

There's already a bunch of nagios plugins for areca out there, including:
http://exchange.nagios.org/directory/Plugins/Hardware/Storage-Systems/RAID-Controllers/check_areca/details
http://exchange.nagios.org/directory/Plugins/Operating-Systems/Linux/check-areca/details
https://gist.github.com/46749
https://github.com/erinn/check_areca

Perhaps these can be just integrated,.. but I haven't checked which of them is best (i.e. gives the most information).

Cheers,
Chris.

Patch to check battery with megacli + option to exit OK when no raid is found

--- check_raid.pl.orig  2013-09-03 10:40:36.000000000 -0700
+++ check_raid.pl       2013-09-03 09:57:04.000000000 -0700
@@ -724,6 +724,7 @@
        {
                'pdlist' => ['-|', '@CMD', '-PDList', '-aALL', '-NoLog'],
                'ldinfo' => ['-|', '@CMD', '-LdInfo', '-Lall', '-aALL', '-NoLog'],
+               'battery' => ['-|', '@CMD', '-AdpBbuCmd', '-GetBbuStatus', '-aALL', '-NoLog'],
        }
 }

@@ -745,7 +746,7 @@
        my $this = shift;

        my $fh = $this->cmd('pdlist');
-       my (@status, @devs, @vols, %cur, %cur_vol);
+       my (@status, @devs, @vols, @bats, %cur, %cur_vol, %cur_bat);
        while (<$fh>) {
                if (my($s) = /Device Id: (\S+)/) {
                        push(@devs, { %cur }) if %cur;
@@ -793,6 +794,24 @@
        close $fh;
        push(@vols, { %cur_vol }) if %cur_vol;

+    # check battery
+    $fh = $this->cmd('battery');
+    while (<$fh>) {
+
+        if (my($s) = /BBU\sstatus\sfor\sAdapter:\s*(\S+)/) {
+            push(@bats, { %cur_bat }) if %cur_bat;
+            %cur_bat = ( name => $s, state => undef );
+            next;
+        }
+        if (my($s) = /Battery\sState:\s*(\S+)/) {
+            $cur_bat{state} = $s;
+            next;
+        }
+
+    }
+    close $fh;
+    push(@bats, { %cur_bat}) if %cur_bat;
+
        my @vstatus;
        foreach my $vol (@vols) {
                # It's possible to create volumes without a name
@@ -818,9 +837,23 @@
                }
        }

-       push(@status,
-               'Volumes(' . ($#vols + 1) . '): ' . join(',', @vstatus) .
-               '; Devices('. ($#devs + 1) . '): ' . $this->join_status(\%dstatus));
+    my @bstatus;
+    foreach my $bat (@bats) {
+               push(@bstatus, sprintf "Battery%s:%s", $bat->{name}, $bat->{state});
+               if ($bat->{state} eq 'Failed') {
+                       $this->critical;
+               }
+
+    }
+
+       #push(@status,
+       #       'Volumes(' . ($#vols + 1) . '): ' . join(',', @vstatus) .
+       #       '; Devices('. ($#devs + 1) . '): ' . $this->join_status(\%dstatus));
+    push(@status,
+        'Volumes(' . ($#vols + 1) . '): ' . join(',', @vstatus) .
+        '; Devices(' . ($#devs + 1) . '): ' . $this->join_status(\%dstatus) .
+        '; Batteries(' . ($#bats + 1) . '): ' . join(',',@bstatus)) ;
+

        return unless @status;

@@ -3023,7 +3056,7 @@
 use warnings;
 use Getopt::Long;

-my ($opt_V, $opt_d, $opt_h, $opt_W, $opt_S, $opt_p, $opt_l);
+my ($opt_V, $opt_d, $opt_h, $opt_W, $opt_S, $opt_p, $opt_l, $opt_O);
 my (%ERRORS) = (OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3);
 my ($VERSION) = "3.0.1";
 my ($message, $status);
@@ -3082,6 +3115,9 @@
                # skip inactive plugins (disabled or no tools available)
                next unless $plugin->active;

+        # skip if no check method (not standalone checker)
+        next unless $plugin->can('check');
+
                # collect sudo rules
                my @rules = $plugin->sudo(1) or next;

@@ -3158,6 +3194,7 @@
        'h' => \$opt_h, 'help' => \$opt_h,
        'S' => \$opt_S, 'sudoers' => \$opt_S,
        'W' => \$opt_W, 'warnonly' => \$opt_W,
+       "O" => \$opt_O, "noraidok" => \$opt_O,
        'p=s' => \$opt_p, 'plugin=s' => \$opt_p,
        'l' => \$opt_l, 'list-plugins' => \$opt_l,
 ) or exit($ERRORS{UNKNOWN});
@@ -3226,7 +3263,10 @@
        } else {
                print "UNKNOWN: ";
        }
-       print "$message\n";
+               print "$message\n";
+} elsif ($opt_O) {
+       $status = $ERRORS{OK};
+       print "No RAID configuration found\n";
 } else {
        $status = $ERRORS{UNKNOWN};
        print "No RAID configuration found (tried: ", join(', ', @plugins), ")\n";

cciss: still has problems with HP Smart Array 6i

$ /usr/lib/nagios/plugins/check_raid -d
DEBUG EXEC: /sys/module/hpsa/refcnt at /usr/lib/nagios/plugins/check_raid line 435.
DEBUG EXEC: /proc/driver/cciss at /usr/lib/nagios/plugins/check_raid line 435.
DEBUG OPENDIR: /proc/driver/cciss at /usr/lib/nagios/plugins/check_raid line 442.
DEBUG EXEC: /proc/driver/cciss/cciss0 at /usr/lib/nagios/plugins/check_raid line 435.
DEBUG EXEC: >&2 /usr/sbin/cciss_vol_status -v at /usr/lib/nagios/plugins/check_raid line 431.
DEBUG EXEC: /usr/sbin/cciss_vol_status -V /dev/cciss/c0d0 at /usr/lib/nagios/plugins/check_raid line 435.
Unparsed[/dev/cciss/c0d0: (Smart Array 6i) Enclosure  (S/N: ) on Bus 0, Physical Port J1 status: OK.] at /usr/lib/nagios/plugins/check_raid line 3394, <$fh> line 10.
OK: cciss:[/dev/cciss/c0d0(Smart Array 6i): Volume 0 (RAID 1): OK, Drives(2): J1-0-0,J1-0-1=OK]
$ cat /proc/driver/cciss/cciss0 
cciss0: HP Smart Array 6i Controller
Board ID: 0x40910e11
Firmware Version: 2.58
IRQ: 24
Logical drives: 1
Current Q depth: 0
Current # commands on controller: 0
Max Q depth since init: 6
Max # commands on controller since init: 7
Max SG entries since init: 128
Sequential access devices: 0

cciss/c0d0:   72.83GB   RAID 1(1+0)
$ >&2 /usr/sbin/cciss_vol_status -v
cciss_vol_status version 1.10
$ /usr/sbin/cciss_vol_status -V /dev/cciss/c0d0
Controller: Smart Array 6i
  Board ID: 0x40910e11
  Logical drives: 0
  Running firmware: 2.58
  ROM firmware: 2.58
/dev/cciss/c0d0: (Smart Array 6i) RAID 1 Volume 0 status: OK. 
  Physical drives: 2
    b0t0 connector J1 box 0 bay 0                 COMPAQ  BD07289BB8                               DAL1P64091FN0615     HPB1 OK
    b0t1 connector J1 box 0 bay 1                 COMPAQ  BD0728A4B4                                       J2094RPK     HPB8 OK
/dev/cciss/c0d0: (Smart Array 6i) Enclosure  (S/N: ) on Bus 0, Physical Port J1 status: OK.

Many Thanks.

Drive failed but output still reporting OK

root@dl180-001:[/usr/local/sbin]# ./check_raid.pl
OK: hpacucli:[Smart Array P410: Array A(OK)[LUN1:OK], Array C(Failed)[LUN3:OK], Array B(OK)[LUN2:OK]]

Here is the full array status:

root@dl180-001:[/usr/local/sbin]# hpacucli ctrl all show config

Smart Array P410 in Slot 1                (sn: xxxxxx)

   array A (SAS, Unused Space: 0 MB)


      logicaldrive 1 (558.9 GB, RAID 1, OK)

      physicaldrive 1I:1:1 (port 1I:box 1:bay 1, SAS, 600.1 GB, OK)
      physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SAS, 600.1 GB, OK)
      physicaldrive 1I:1:13 (port 1I:box 1:bay 13, SAS, 600.1 GB, OK, active spare)
      physicaldrive 1I:1:14 (port 1I:box 1:bay 14, SAS, 600.1 GB, OK, spare)

   array B (SAS, Unused Space: 0 MB)


      logicaldrive 2 (2.2 TB, RAID 5, OK)

      physicaldrive 1I:1:3 (port 1I:box 1:bay 3, SAS, 600.1 GB, OK)
      physicaldrive 1I:1:4 (port 1I:box 1:bay 4, SAS, 600.1 GB, OK)
      physicaldrive 1I:1:5 (port 1I:box 1:bay 5, SAS, 600.1 GB, OK)
      physicaldrive 1I:1:6 (port 1I:box 1:bay 6, SAS, 600.1 GB, OK)
      physicaldrive 1I:1:7 (port 1I:box 1:bay 7, SAS, 600.1 GB, OK)
      physicaldrive 1I:1:13 (port 1I:box 1:bay 13, SAS, 600.1 GB, OK, active spare)
      physicaldrive 1I:1:14 (port 1I:box 1:bay 14, SAS, 600.1 GB, OK, spare)

   array C (SAS, Unused Space: 0 MB)


      logicaldrive 3 (2.2 TB, RAID 5, OK)

      physicaldrive 1I:1:8 (port 1I:box 1:bay 8, SAS, 600.1 GB, Failed)
      physicaldrive 1I:1:9 (port 1I:box 1:bay 9, SAS, 600.1 GB, OK)
      physicaldrive 1I:1:10 (port 1I:box 1:bay 10, SAS, 600.1 GB, OK)
      physicaldrive 1I:1:11 (port 1I:box 1:bay 11, SAS, 600.1 GB, OK)
      physicaldrive 1I:1:12 (port 1I:box 1:bay 12, SAS, 600.1 GB, OK)
      physicaldrive 1I:1:13 (port 1I:box 1:bay 13, SAS, 600.1 GB, OK, active spare)
      physicaldrive 1I:1:14 (port 1I:box 1:bay 14, SAS, 600.1 GB, OK, spare)

Logicaldrive status (See Array C failed):

root@dl180-001:[/usr/local/sbin]# hpacucli ctrl slot=1 logicaldrive all show

Smart Array P410 in Slot 1

   array A

      logicaldrive 1 (558.9 GB, RAID 1, OK)

   array B

      logicaldrive 2 (2.2 TB, RAID 5, OK)

   array C (Failed)

      logicaldrive 3 (2.2 TB, RAID 5, OK)

For now I was able to get it to alarm by putting in $this->critical if $s && $s ne 'OK'; in the scan logicaldrives section where it picks up the (Failed) status and prints it in the check_raid.pl output.

Ideas?

Thanks!

MegaCLI "Use of uninitialized value" with CacheCade

thanks a lot for your work on this great plugin!

# /usr/local/nagios/libexec/check_raid.pl -V
check_raid Version 3.2.2

# /usr/local/nagios/libexec/check_raid.pl -p megacli
Use of uninitialized value in sprintf at /usr/local/nagios/libexec/check_raid.pl line 1165.
Use of uninitialized value in string ne at /usr/local/nagios/libexec/check_raid.pl line 1166.
CRITICAL: megacli:[Volumes(2): raid6:Optimal,cachecade0:; Devices(8): 00,01,02,03,04,05,06,07=Online]
# /opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -Lall -aALL -NoLog


Adapter 0 -- Virtual Drive Information:
Virtual Drive: 0 (Target Id: 0)
Name                :raid6
RAID Level          : Primary-6, Secondary-0, RAID Level Qualifier-3
Size                : 2.725 TB
Parity Size         : 1.089 TB
State               : Optimal
Strip Size          : 64 KB
Number Of Drives    : 7
Span Depth          : 1
Default Cache Policy: WriteBack, ReadAhead, Direct, No Write Cache if Bad BBU
Current Cache Policy: WriteBack, ReadAhead, Direct, No Write Cache if Bad BBU
Default Access Policy: Read/Write
Current Access Policy: Read/Write
Disk Cache Policy   : Disk's Default
Encryption Type     : None
Default Power Savings Policy: Controller Defined
Current Power Savings Policy: None
Can spin up in 1 minute: No
LD has drives that support T10 power conditions: No
LD's IO profile supports MAX power savings with cached writes: No
Bad Blocks Exist: No
Is VD Cached: No


CacheCade Virtual Drive: 1 (Target Id: 1)
Virtual Drive Type: CacheCade 
Name:cachecade0
Size:512.0 GB
Target Id of the Associated LDs : None
Default Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
Current Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU



Exit Code: 0x00
# /opt/MegaRAID/MegaCli/MegaCli64 -V


      MegaCLI SAS RAID Management Tool  Ver 8.02.16 July 01, 2011

    (c)Copyright 2011, LSI Corporation, All Rights Reserved.

Exit Code: 0x00

other rules for sas2ircu sudoers

Hi.

I revised my own rules that is use for sas2ircu to be:
nagios-sensor ALL = (:root) NOPASSWD: /opt/lsi/sas2ircu/sas2ircu [Ll][Ii][Ss][Tt]
nagios-sensor ALL = (:root) NOPASSWD: /opt/lsi/sas2ircu/sas2ircu [[:digit:]] [Ss][Tt][Aa][Tt][Uu][Ss]
nagios-sensor ALL = (:root) NOPASSWD: /opt/lsi/sas2ircu/sas2ircu [[:digit:]][[:digit:]] [Ss][Tt][Aa][Tt][Uu][Ss]
nagios-sensor ALL = (:root) NOPASSWD: /opt/lsi/sas2ircu/sas2ircu [[:digit:]][[:digit:]][[:digit:]] [Ss][Tt][Aa][Tt][Uu][Ss]

As you can see:

  • the commands may be entered case insensitive
  • the status command is limited to 1, 2 or 3 digits

Actually I haven't quite understood yet what you do with the sudoers code in check_raid... is it meant to automatically generate sudoers rules and place them in /etc/sudoers.d/ ?
When is this done?

Anyway... given that the rules in the code may be used by people to set the "correct and minimal" rules manually, I'd suggest you take over above changes.

  • Even thought check_raid never calls the commands LIST/STATUS with other cases, the user may manually invoke the tool and there he should be able to do so.
  • Same for the digits which are allowed in the range [0-255].

It seems you added a loop, that make a STATUS rule for each found controller... is this really good?
a) more (unnecessary) rules
b) what happens if a new controller is added

Cheers,
Chris.

old sudo - "Illegal option -A"

Hello,
trying to run on an old machine (RHEL4) with sudo version 1.6.7p5, plugin ends with error. Running as root works well.
Tried some older version and it didn't show this error, but it didn't work well for me for other reason. So i need to run the newer plugin version. Is there a way to run this? And no, updating the system is not an option, unfortunately 😕

Thanks

$ ./check_raid
/usr/bin/sudo: Illegal option -A
usage: sudo -V | -h | -L | -l | -v | -k | -K | [-H] [-P] [-S] [-b] [-p prompt]
            [-u username/#uid] [-r role] [-t type] -s | <command>
Use of uninitialized value in substitution iterator at /opt/nagios/nplugin/libexec/check_raid line 416.
/usr/bin/sudo: Illegal option -A
usage: sudo -V | -h | -L | -l | -v | -k | -K | [-H] [-P] [-S] [-b] [-p prompt]
            [-u username/#uid] [-r role] [-t type] -s | <command>
UNKNOWN: mpt:[Plugin error]

Arcconf parser breaks on channel information

My arcconf, Version 7.0 (B18781) doesn't just list physical devices, but lists them per channel. That looks like this:

----------------------------------------------------------------------
Physical Device information
----------------------------------------------------------------------
   Channel #0:
      Transfer Speed                        : Ultra320
      Initiator at SCSI ID 7
      Device #0
         Device is a Hard drive
         State                              : Online
         Supported                          : Yes
         Transfer Speed                     : Ultra320
         Reported Channel,Device(T:L)       : 0,0(0:0)
         Vendor                             : SEAGATE
         Model                              : ST3146707LC
         Firmware                           : 0005
         Serial number                      : 3KS5ABTV0000970648ZZ
         Size                               : 140014 MB
         Write Cache                        : Unknown
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
      Device #1
         Device is a Hard drive
         State                              : Online
         Supported                          : Yes
         Transfer Speed                     : Ultra320
         Reported Channel,Device(T:L)       : 0,1(1:0)
         Vendor                             : SEAGATE
         Model                              : ST3146707LC
         Firmware                           : 0005
         Serial number                      : 3KS5SD1P00009718B64U
         Size                               : 140014 MB
         Write Cache                        : Unknown
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
      Device #6
         Device is an Enclosure
         Type                               : SAF-TE
         Vendor                             : SUPER
         Model                              : GEM318
         Firmware                           : 0
         Status of Enclosure
            Temperature status              : Normal
   Channel #1:
      Transfer Speed                        : Ultra320
      Initiator at SCSI ID 7
      No physical drives attached

This breaks the parser in check_raid. The ouput of "check_raid.pl -d" is:

DEBUG EXEC: /usr/sbin/arcconf GETSTATUS 1 at ./check_raid.pl line 382.
DEBUG EXEC: /usr/sbin/arcconf GETCONFIG 1 AL at ./check_raid.pl line 382.
Unparsed Physical Device data: [   Channel #0:]
Use of uninitialized value $pd in array element at ./check_raid.pl line 2311, <$fh> line 58.
Unparsed Physical Device data: [      Initiator at SCSI ID 7]
Unparsed Physical Device data: [         Status of Enclosure]
Unparsed Physical Device data: [            Temperature status              : Normal]
Unparsed Physical Device data: [   Channel #1:]
Unparsed Physical Device data: [      Initiator at SCSI ID 7]
Unparsed Physical Device data: [      No physical drives attached]
Use of uninitialized value in pattern match (m//) at ./check_raid.pl line 2489.
Use of uninitialized value in string eq at ./check_raid.pl line 2491.
Use of uninitialized value in pattern match (m//) at ./check_raid.pl line 2493.
Use of uninitialized value in hash element at ./check_raid.pl line 2498.
Use of uninitialized value in pattern match (m//) at ./check_raid.pl line 2489.
Use of uninitialized value in string eq at ./check_raid.pl line 2491.
Use of uninitialized value in pattern match (m//) at ./check_raid.pl line 2493.
Use of uninitialized value in hash element at ./check_raid.pl line 2498.
Use of uninitialized value in pattern match (m//) at ./check_raid.pl line 2489.
Use of uninitialized value in string eq at ./check_raid.pl line 2491.
Use of uninitialized value in pattern match (m//) at ./check_raid.pl line 2493.
Use of uninitialized value in hash element at ./check_raid.pl line 2498.
Use of uninitialized value in pattern match (m//) at ./check_raid.pl line 2489.
Use of uninitialized value in string eq at ./check_raid.pl line 2491.
Use of uninitialized value in pattern match (m//) at ./check_raid.pl line 2493.
Use of uninitialized value in hash element at ./check_raid.pl line 2498.
Use of uninitialized value in string eq at ./check_raid.pl line 2491.
Use of uninitialized value in pattern match (m//) at ./check_raid.pl line 2493.
Use of uninitialized value in hash element at ./check_raid.pl line 2498.
Use of uninitialized value $s[0] in join or string at ./check_raid.pl line 281.
Use of uninitialized value $s[1] in join or string at ./check_raid.pl line 281.
Use of uninitialized value $s[2] in join or string at ./check_raid.pl line 281.
Use of uninitialized value $s[3] in join or string at ./check_raid.pl line 281.
Use of uninitialized value $s[4] in join or string at ./check_raid.pl line 281.
CRITICAL: arcconf:[Controller:Optimal, Logical Device 0(RAID):Optimal, Drives: ,,,,= 3KS5ABTV0000970648ZZ,3KS5SD1P00009718B64U=Online]

I propose (and wrote) a fix that incorporates the channel number. If channel nr is not mentioned, it will be zero.

wrong syntax in megacli perfdata

the perfdata returns the battery's voltage as warning limit of the temperature.
Have a look here: http://docs.icinga.org/latest/en/perfdata.html#formatperfdata

you could use something like:

@@ -1073,7 +1073,7 @@
        # Return current battery temparature & voltage.
        #
        # Battery0=18;4074
-       push(@bpdata, sprintf "Battery%s=%s;%s", $bat->{name}, $bat->{temperature}, $bat->{voltage});
+       push(@bpdata, sprintf "Battery%s_T=%s;;;; Battery%s_V=%s;;;;", $bat->{name}, $bat->{temperature}, $bat->{name}, $bat->{voltage});

        # Long output.
        # Detailed plugin output.

[v3.2.3] Arcconf 1.7 (NOT PARSED)

Arcconf:

  | UCLI |  Adaptec by PMC uniform command line interface
  | UCLI |  Version 1.7 (B21229)
  | UCLI |  (C) Adaptec by PMCS 2003-2014
  | UCLI |  All Rights Reserved

Execute with debug:

[k0ste@csvideo ~]$ /usr/lib/monitoring-plugins/check_raid.pl -d
DEBUG EXEC: /sbin/sudo -A /sbin/arcconf GETSTATUS 1 at /usr/lib/monitoring-plugins/check_raid.pl line 452.
DEBUG EXEC: /sbin/sudo -A /sbin/arcconf GETCONFIG 1 AL at /usr/lib/monitoring-plugins/check_raid.pl line 452.
SUBSECTION of [Controller information] NOT PARSED: [RAID Properties] [   Copyback                                 : Disabled] at /usr/lib/monitoring-plugins/check_raid.pl line 2669, <$fh> line 33.
SUBSECTION of [Controller information] NOT PARSED: [RAID Properties] [   Background consistency check             : Enabled] at /usr/lib/monitoring-plugins/check_raid.pl line 2669, <$fh> line 34.
SUBSECTION of [Controller information] NOT PARSED: [RAID Properties] [   Background consistency check period      : 0] at /usr/lib/monitoring-plugins/check_raid.pl line 2669, <$fh> line 35.
SUBSECTION of [Controller information] NOT PARSED: [RAID Properties] [   Automatic Failover                       : Enabled] at /usr/lib/monitoring-plugins/check_raid.pl line 2669, <$fh> line 36.
SUBSECTION of [Controller information] NOT PARSED: [Controller BIOS Setting Information] [   Runtime BIOS                             : Enabled] at /usr/lib/monitoring-plugins/check_raid.pl line 2669, <$fh> line 40.
SUBSECTION of [Controller information] NOT PARSED: [Controller BIOS Setting Information] [   Array BBS Support                        : Enabled] at /usr/lib/monitoring-plugins/check_raid.pl line 2669, <$fh> line 41.
SUBSECTION of [Controller information] NOT PARSED: [Controller BIOS Setting Information] [   Physical Drives Displayed during POST    : Disabled] at /usr/lib/monitoring-plugins/check_raid.pl line 2669, <$fh> line 42.
SUBSECTION of [Controller information] NOT PARSED: [Controller BIOS Setting Information] [   Backplane Mode                           : IBPI] at /usr/lib/monitoring-plugins/check_raid.pl line 2669, <$fh> line 43.
SUBSECTION of [Controller information] NOT PARSED: [Controller BIOS Setting Information] [   BIOS Halt on Missing Drive Count         : 255] at /usr/lib/monitoring-plugins/check_raid.pl line 2669, <$fh> line 44.
OK: arcconf:[Controller:Optimal, Logical Device 0(video):Optimal, Drives: WD-WMC4N0EA309P,WD-WMC4N0D4C3EC,WD-WMC4N0DARL7H,WD-WMC4N0D68KUE,WD-WCC1T0338432,WD-WCC1T0348080,WD-WCC1T0350619,WD-WMC1T1442256,WD-WMC1T1128983,WD-WMC1T0982452,WD-WMC1T1128924,WD-WCC1T0355878,WD-WMC1T1133813,WD-WMC1T0026837,WD-WMC1T1479988,WD-WMC1T3351994=Online]

arcconf GETSTATUS 1

Controllers found: 1
   Current operation              : None

Command completed successfully.

arcconf GETCONFIG 1 AL

Controllers found: 1
----------------------------------------------------------------------
Controller information
----------------------------------------------------------------------
   Controller Status                        : Optimal
   Controller Mode                          : RAID (Expose RAW)
   Controller Cache Preservation            : Disabled
   Channel description                      : SAS/SATA
   Controller Model                         : Adaptec ASR71605
   Controller Serial Number                 : 3A021301524
   Controller World Wide Name               : 50000D110617B500
   Controller Alarm                         : Enabled
   Physical Slot                            : 6
   Temperature                              : 54 C/ 129 F (Normal)
   Installed memory                         : 1024 MB
   Global task priority                     : Medium
   Performance Mode                         : Default/Dynamic
   Host bus type                            : PCIe
   Host bus speed                           : 8000 MHz
   Host bus link width                      : 8 bit(s)/link(s)
   Stayawake period                         : Disabled
   Spinup limit internal drives             : 0
   Spinup limit external drives             : 0
   Defunct disk drive count                 : 0
   Logical devices/Failed/Degraded          : 1/0/0
   NCQ status                               : Enabled
   Statistics data collection mode          : Disabled
   Global Physical Device Write Cache Policy: Drive Specific
   Monitor Log Severity Level               : Informational
   --------------------------------------------------------
   RAID Properties
   --------------------------------------------------------
   Copyback                                 : Disabled
   Background consistency check             : Enabled
   Background consistency check period      : 0
   Automatic Failover                       : Enabled
   --------------------------------------------------------
   Controller BIOS Setting Information
   --------------------------------------------------------
   Runtime BIOS                             : Enabled
   Array BBS Support                        : Enabled
   Physical Drives Displayed during POST    : Disabled
   Backplane Mode                           : IBPI
   BIOS Halt on Missing Drive Count         : 255
   --------------------------------------------------------
   Controller Version Information
   --------------------------------------------------------
   BIOS                                     : 7.5-0 (32033)
   Firmware                                 : 7.5-0 (32033)
   Driver                                   : 1.2-0 (30300)
   Boot Flash                               : 7.5-0 (32033)

   --------------------------------------------------------
   Controller Cache Backup Unit Information
   --------------------------------------------------------

    Overall Backup Unit Status              : Not Present

----------------------------------------------------------------------
Logical device information
----------------------------------------------------------------------
Logical device number 0
   Logical device name                      : video
   Block Size of member drives              : 512 Bytes
   RAID level                               : 5
   Unique Identifier                        : DADDB828
   Status of logical device                 : Optimal
   Size                                     : 42854390 MB
   Parity space                             : 2856960 MB
   Stripe-unit size                         : 256 KB
   Read-cache setting                       : Enabled
   Read-cache status                        : On
   Write-cache setting                      : Enabled
   Write-cache status                       : On
   Partitioned                              : No
   Protected by Hot-Spare                   : No
   Bootable                                 : Yes
   Failed stripes                           : No
   Power settings                           : Disabled
   --------------------------------------------------------
   Logical device segment information
   --------------------------------------------------------
   Segment 0                                : Present (Controller:1,Enclosure:0,Slot:0)      WD-WMC4N0EA309P
   Segment 1                                : Present (Controller:1,Enclosure:0,Slot:1)      WD-WMC4N0D4C3EC
   Segment 2                                : Present (Controller:1,Enclosure:0,Slot:2)      WD-WMC4N0DARL7H
   Segment 3                                : Present (Controller:1,Enclosure:0,Slot:3)      WD-WMC4N0D68KUE
   Segment 4                                : Present (Controller:1,Enclosure:0,Slot:4)      WD-WCC1T0338432
   Segment 5                                : Present (Controller:1,Enclosure:0,Slot:5)      WD-WCC1T0348080
   Segment 6                                : Present (Controller:1,Enclosure:0,Slot:6)      WD-WCC1T0350619
   Segment 7                                : Present (Controller:1,Enclosure:0,Slot:7)      WD-WMC1T1442256
   Segment 8                                : Present (Controller:1,Enclosure:0,Slot:8)      WD-WMC1T1128983
   Segment 9                                : Present (Controller:1,Enclosure:0,Slot:9)      WD-WMC1T0982452
   Segment 10                               : Present (Controller:1,Enclosure:0,Slot:10)      WD-WMC1T1128924
   Segment 11                               : Present (Controller:1,Enclosure:0,Slot:11)      WD-WCC1T0355878
   Segment 12                               : Present (Controller:1,Enclosure:0,Slot:12)      WD-WMC1T1133813
   Segment 13                               : Present (Controller:1,Enclosure:0,Slot:13)      WD-WMC1T0026837
   Segment 14                               : Present (Controller:1,Enclosure:0,Slot:14)      WD-WMC1T1479988
   Segment 15                               : Present (Controller:1,Enclosure:0,Slot:15)      WD-WMC1T3351994


----------------------------------------------------------------------
Physical Device information
----------------------------------------------------------------------
      Device #0
         Device is a Hard drive
         State                              : Online
         Block Size                         : 512 Bytes
         Supported                          : Yes
         Transfer Speed                     : SATA 6.0 Gb/s
         Reported Channel,Device(T:L)       : 0,0(0:0)
         Reported Location                  : Enclosure 0, Slot 0
         Reported ESD(T:L)                  : 2,0(0:0)
         Vendor                             : ATA
         Model                              : WDC WD30EFRX-68E
         Firmware                           : 82.00A82
         Serial number                      : WD-WMC4N0EA309P
         World-wide name                    : 50014EE604E6A6D5
         Reserved Size                      : 4739480 KB
         Used Size                          : 2856960 MB
         Unused Size                        : 64 KB
         Total Size                         : 2861588 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off
         SSD                                : No
         NCQ status                         : Enabled
      Device #1
         Device is a Hard drive
         State                              : Online
         Block Size                         : 512 Bytes
         Supported                          : Yes
         Transfer Speed                     : SATA 6.0 Gb/s
         Reported Channel,Device(T:L)       : 0,1(1:0)
         Reported Location                  : Enclosure 0, Slot 1
         Reported ESD(T:L)                  : 2,0(0:0)
         Vendor                             : ATA
         Model                              : WDC WD30EFRX-68E
         Firmware                           : 82.00A82
         Serial number                      : WD-WMC4N0D4C3EC
         World-wide name                    : 50014EE604E61E57
         Reserved Size                      : 4739480 KB
         Used Size                          : 2856960 MB
         Unused Size                        : 64 KB
         Total Size                         : 2861588 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off
         SSD                                : No
         NCQ status                         : Enabled
      Device #2
         Device is a Hard drive
         State                              : Online
         Block Size                         : 512 Bytes
         Supported                          : Yes
         Transfer Speed                     : SATA 6.0 Gb/s
         Reported Channel,Device(T:L)       : 0,2(2:0)
         Reported Location                  : Enclosure 0, Slot 2
         Reported ESD(T:L)                  : 2,0(0:0)
         Vendor                             : ATA
         Model                              : WDC WD30EFRX-68E
         Firmware                           : 82.00A82
         Serial number                      : WD-WMC4N0DARL7H
         World-wide name                    : 50014EE6AF928791
         Reserved Size                      : 4739480 KB
         Used Size                          : 2856960 MB
         Unused Size                        : 64 KB
         Total Size                         : 2861588 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off
         SSD                                : No
         NCQ status                         : Enabled
      Device #3
         Device is a Hard drive
         State                              : Online
         Block Size                         : 512 Bytes
         Supported                          : Yes
         Transfer Speed                     : SATA 6.0 Gb/s
         Reported Channel,Device(T:L)       : 0,3(3:0)
         Reported Location                  : Enclosure 0, Slot 3
         Reported ESD(T:L)                  : 2,0(0:0)
         Vendor                             : ATA
         Model                              : WDC WD30EFRX-68E
         Firmware                           : 82.00A82
         Serial number                      : WD-WMC4N0D68KUE
         World-wide name                    : 50014EE604BF4944
         Reserved Size                      : 4739480 KB
         Used Size                          : 2856960 MB
         Unused Size                        : 64 KB
         Total Size                         : 2861588 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off
         SSD                                : No
         NCQ status                         : Enabled
      Device #4
         Device is a Hard drive
         State                              : Online
         Block Size                         : 512 Bytes
         Supported                          : Yes
         Transfer Speed                     : SATA 6.0 Gb/s
         Reported Channel,Device(T:L)       : 0,4(4:0)
         Reported Location                  : Enclosure 0, Slot 4
         Reported ESD(T:L)                  : 2,0(0:0)
         Vendor                             : ATA
         Model                              : WDC WD30EFRX-68A
         Firmware                           : 80.00A80
         Serial number                      : WD-WCC1T0338432
         World-wide name                    : 50014EE2B2BD2457
         Reserved Size                      : 4739480 KB
         Used Size                          : 2856960 MB
         Unused Size                        : 64 KB
         Total Size                         : 2861588 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off
         SSD                                : No
         NCQ status                         : Enabled
      Device #5
         Device is a Hard drive
         State                              : Online
         Block Size                         : 512 Bytes
         Supported                          : Yes
         Transfer Speed                     : SATA 6.0 Gb/s
         Reported Channel,Device(T:L)       : 0,5(5:0)
         Reported Location                  : Enclosure 0, Slot 5
         Reported ESD(T:L)                  : 2,0(0:0)
         Vendor                             : ATA
         Model                              : WDC WD30EFRX-68A
         Firmware                           : 80.00A80
         Serial number                      : WD-WCC1T0348080
         World-wide name                    : 50014EE2B2BD13C6
         Reserved Size                      : 4739480 KB
         Used Size                          : 2856960 MB
         Unused Size                        : 64 KB
         Total Size                         : 2861588 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off
         SSD                                : No
         NCQ status                         : Enabled
      Device #6
         Device is a Hard drive
         State                              : Online
         Block Size                         : 512 Bytes
         Supported                          : Yes
         Transfer Speed                     : SATA 6.0 Gb/s
         Reported Channel,Device(T:L)       : 0,6(6:0)
         Reported Location                  : Enclosure 0, Slot 6
         Reported ESD(T:L)                  : 2,0(0:0)
         Vendor                             : ATA
         Model                              : WDC WD30EFRX-68A
         Firmware                           : 80.00A80
         Serial number                      : WD-WCC1T0350619
         World-wide name                    : 50014EE2B2BC72EA
         Reserved Size                      : 4739480 KB
         Used Size                          : 2856960 MB
         Unused Size                        : 64 KB
         Total Size                         : 2861588 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off
         SSD                                : No
         NCQ status                         : Enabled
      Device #7
         Device is a Hard drive
         State                              : Online
         Block Size                         : 512 Bytes
         Supported                          : Yes
         Transfer Speed                     : SATA 6.0 Gb/s
         Reported Channel,Device(T:L)       : 0,7(7:0)
         Reported Location                  : Enclosure 0, Slot 7
         Reported ESD(T:L)                  : 2,0(0:0)
         Vendor                             : ATA
         Model                              : WDC WD30EFRX-68A
         Firmware                           : 80.00A80
         Serial number                      : WD-WMC1T1442256
         World-wide name                    : 50014EE058D2D01E
         Reserved Size                      : 4739480 KB
         Used Size                          : 2856960 MB
         Unused Size                        : 64 KB
         Total Size                         : 2861588 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off
         SSD                                : No
         NCQ status                         : Enabled
      Device #8
         Device is a Hard drive
         State                              : Online
         Block Size                         : 512 Bytes
         Supported                          : Yes
         Transfer Speed                     : SATA 6.0 Gb/s
         Reported Channel,Device(T:L)       : 0,8(8:0)
         Reported Location                  : Enclosure 0, Slot 8
         Reported ESD(T:L)                  : 2,0(0:0)
         Vendor                             : ATA
         Model                              : WDC WD30EFRX-68A
         Firmware                           : 80.00A80
         Serial number                      : WD-WMC1T1128983
         World-wide name                    : 50014EE602E4388E
         Reserved Size                      : 4739480 KB
         Used Size                          : 2856960 MB
         Unused Size                        : 64 KB
         Total Size                         : 2861588 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off
         SSD                                : No
         NCQ status                         : Enabled
      Device #9
         Device is a Hard drive
         State                              : Online
         Block Size                         : 512 Bytes
         Supported                          : Yes
         Transfer Speed                     : SATA 6.0 Gb/s
         Reported Channel,Device(T:L)       : 0,9(9:0)
         Reported Location                  : Enclosure 0, Slot 9
         Reported ESD(T:L)                  : 2,0(0:0)
         Vendor                             : ATA
         Model                              : WDC WD30EFRX-68A
         Firmware                           : 80.00A80
         Serial number                      : WD-WMC1T0982452
         World-wide name                    : 50014EE6AD8ED764
         Reserved Size                      : 4739480 KB
         Used Size                          : 2856960 MB
         Unused Size                        : 64 KB
         Total Size                         : 2861588 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off
         SSD                                : No
         NCQ status                         : Enabled
      Device #10
         Device is a Hard drive
         State                              : Online
         Block Size                         : 512 Bytes
         Supported                          : Yes
         Transfer Speed                     : SATA 6.0 Gb/s
         Reported Channel,Device(T:L)       : 0,10(10:0)
         Reported Location                  : Enclosure 0, Slot 10
         Reported ESD(T:L)                  : 2,0(0:0)
         Vendor                             : ATA
         Model                              : WDC WD30EFRX-68A
         Firmware                           : 80.00A80
         Serial number                      : WD-WMC1T1128924
         World-wide name                    : 50014EE65839A29E
         Reserved Size                      : 4739480 KB
         Used Size                          : 2856960 MB
         Unused Size                        : 64 KB
         Total Size                         : 2861588 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off
         SSD                                : No
         NCQ status                         : Enabled
      Device #11
         Device is a Hard drive
         State                              : Online
         Block Size                         : 512 Bytes
         Supported                          : Yes
         Transfer Speed                     : SATA 6.0 Gb/s
         Reported Channel,Device(T:L)       : 0,11(11:0)
         Reported Location                  : Enclosure 0, Slot 11
         Reported ESD(T:L)                  : 2,0(0:0)
         Vendor                             : ATA
         Model                              : WDC WD30EFRX-68A
         Firmware                           : 80.00A80
         Serial number                      : WD-WCC1T0355878
         World-wide name                    : 50014EE25D66A162
         Reserved Size                      : 4739480 KB
         Used Size                          : 2856960 MB
         Unused Size                        : 64 KB
         Total Size                         : 2861588 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off
         SSD                                : No
         NCQ status                         : Enabled
      Device #12
         Device is a Hard drive
         State                              : Online
         Block Size                         : 512 Bytes
         Supported                          : Yes
         Transfer Speed                     : SATA 6.0 Gb/s
         Reported Channel,Device(T:L)       : 0,12(12:0)
         Reported Location                  : Enclosure 0, Slot 12
         Reported ESD(T:L)                  : 2,0(0:0)
         Vendor                             : ATA
         Model                              : WDC WD30EFRX-68A
         Firmware                           : 80.00A80
         Serial number                      : WD-WMC1T1133813
         World-wide name                    : 50014EE6AD8F1046
         Reserved Size                      : 4739480 KB
         Used Size                          : 2856960 MB
         Unused Size                        : 64 KB
         Total Size                         : 2861588 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off
         SSD                                : No
         NCQ status                         : Enabled
      Device #13
         Device is a Hard drive
         State                              : Online
         Block Size                         : 512 Bytes
         Supported                          : Yes
         Transfer Speed                     : SATA 6.0 Gb/s
         Reported Channel,Device(T:L)       : 0,13(13:0)
         Reported Location                  : Enclosure 0, Slot 13
         Reported ESD(T:L)                  : 2,0(0:0)
         Vendor                             : ATA
         Model                              : WDC WD30EFRX-68A
         Firmware                           : 80.00A80
         Serial number                      : WD-WMC1T0026837
         World-wide name                    : 50014EE65839B0A7
         Reserved Size                      : 4739480 KB
         Used Size                          : 2856960 MB
         Unused Size                        : 64 KB
         Total Size                         : 2861588 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off
         SSD                                : No
         NCQ status                         : Enabled
      Device #14
         Device is a Hard drive
         State                              : Online
         Block Size                         : 512 Bytes
         Supported                          : Yes
         Transfer Speed                     : SATA 6.0 Gb/s
         Reported Channel,Device(T:L)       : 0,14(14:0)
         Reported Location                  : Enclosure 0, Slot 14
         Reported ESD(T:L)                  : 2,0(0:0)
         Vendor                             : ATA
         Model                              : WDC WD30EFRX-68A
         Firmware                           : 80.00A80
         Serial number                      : WD-WMC1T1479988
         World-wide name                    : 50014EE0037D9290
         Reserved Size                      : 4739480 KB
         Used Size                          : 2856960 MB
         Unused Size                        : 64 KB
         Total Size                         : 2861588 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off
         SSD                                : No
         NCQ status                         : Enabled
      Device #15
         Device is a Hard drive
         State                              : Online
         Block Size                         : 512 Bytes
         Supported                          : Yes
         Transfer Speed                     : SATA 6.0 Gb/s
         Reported Channel,Device(T:L)       : 0,15(15:0)
         Reported Location                  : Enclosure 0, Slot 15
         Reported ESD(T:L)                  : 2,0(0:0)
         Vendor                             : ATA
         Model                              : WDC WD30EFRX-68A
         Firmware                           : 80.00A80
         Serial number                      : WD-WMC1T3351994
         World-wide name                    : 50014EE6588C11E0
         Reserved Size                      : 4739480 KB
         Used Size                          : 2856960 MB
         Unused Size                        : 64 KB
         Total Size                         : 2861588 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off
         SSD                                : No
         NCQ status                         : Enabled
      Device #16
         Device is an Enclosure services device
         Reported Channel,Device(T:L)       : 2,0(0:0)
         Enclosure ID                       : 0
         Type                               : SES2
         Vendor                             : ADAPTEC
         Model                              : Virtual SGPIO
         Firmware                           :    1
         Status of Enclosure services device
            Speaker status                  : Not available



Command completed successfully.

CmdTool2 check status result wrong

check_raid.pl -l

cmdtool2
dmraid

check raid.pl

UNKNOWN: cmdtool2:[Plugin error]; dmraid:[Plugin error]

i think this error wrong checking line..

nagios-plugin-check_raid-master/t/data/cmdtool2/CmdTool2.adapter-0 file open to check

Size:~~
State: Optimal
Stripe Size: ~~

but my real server check result is below..

CmdTool2 -CfgDsply -aALL

RAID Level          : Primary-6, Secondary-0, RAID Level Qualifier-3
Size                : 16.370 TB
Sector Size         : 512
Parity Size         : 5.456 TB
State               : Optimal
Strip Size          : 256 KB
Number Of Drives    : 8
Span Depth          : 1
Default Cache Policy: WriteThrough, ReadAdaptive, Direct, No Write Cache if Bad BBU
Current Cache Policy: WriteThrough, ReadAdaptive, Direct, No Write Cache if Bad BBU

different find?
test file line is 

State: Optimal

but real command result is
State               : Optimal

cciss: Broken with latest versions for HP Smart Array 6i

Running '/usr/lib/nagios/plugins/check_raid /proc/mpt' results into:

Unparsed[/dev/cciss/c0d0: (Smart Array 6i) Enclosure PROLIANT 6L2I (S/N: ) on Bus 0, Physical Port J1 status: OK.] at /usr/lib/nagios/plugins/check_raid line 3364, <$fh> line 2.
OK: cciss:[/dev/cciss/c0d0(Smart Array 6i): Volume 0 (RAID 1): OK /dev/cciss/c0d0#0,/dev/cciss/c0d0#1,/dev/cciss/c0d0#2=OK]

The relevant debug output:

DEBUG EXEC: /usr/bin/cciss_vol_status /dev/cciss/c0d0 at /usr/lib/nagios/plugins/check_raid line 435.
Unparsed[/dev/cciss/c0d0: (Smart Array 6i) Enclosure PROLIANT 6L2I (S/N: ) on Bus 0, Physical Port J1 status: OK.] at /usr/lib/nagios/plugins/check_raid line 3364, <$fh> line 2.
# /usr/bin/cciss_vol_status /dev/cciss/c0d0
/dev/cciss/c0d0: (Smart Array 6i) RAID 1 Volume 0 status: OK.
/dev/cciss/c0d0: (Smart Array 6i) Enclosure PROLIANT 6L2I (S/N: ) on Bus 0, Physical Port J1 status: OK.

Many thanks, Jan.

aarcconf only checks the first controller

Just for the records: AFAIU, the arrconf check only checks the controller 1 at the moment.

It seems to me, the easiest way to determine the number of controllers would be:

# /opt/adaptec/arcconf GETVERSION
Controllers found: 1
Controller #1
==============
Firmware           : 5.2-0 (15825)
Staged Firmware    : 5.2-0 (15825)
BIOS               : 5.2-0 (15825)
Driver             : 1.1-5 (2461)
Boot Flash         : 5.2-0 (15825)


Command completed successfully.

I may find time later to add code (in my crappy Perl style) to support this, unless you're faster again ;-)

Cheers,
Chris.

Solaris software RAID via metastat didn't work

It is said, that Solaris software RAID via metastat is supported, but it seems to me, that it didn't work:

# /usr/local/nagios/libexec/check_raid.pl
No RAID configuration found (tried: lsscsi, mdstat, megacli, ips, aaccli, afacli, mpt, gdth, dpt_i2o, tw_cli, arcconf, megarc, cmdtool2, cciss, sas2ircu, hpacucli, areca)
# metastat -c
d60              m  5.9GB d61 d62
    d61          s  5.9GB c1t1d0s6
    d62          s  5.9GB c1t0d0s6
d30              m   23GB d31 d32
    d31          s   23GB c1t1d0s3
    d32          s   23GB c1t0d0s3
...

OS is Solaris 10:

# cat /etc/release
                      Solaris 10 10/09 s10s_u8wos_08a SPARC
           Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
                        Use is subject to license terms.
                           Assembled 16 September 2009

Recognizing hpsa devices without sg module

Hi,

at the moment it is necessary to load the sg module if one is using the hpsa module for recent HP Raid controllers, although the very recent cciss_vol_status uses /dev/sd[a-z] happily.

So it might make sense to check vendor and model of the disk devices instead:

root@host:/sys/block/sda/device# cat vendor 
HP      
root@host:/sys/block/sda/device# cat model 
LOGICAL VOLUME 

not sure if thats the best idea, but the only one that jumps into my mind right now.
modprobe sg works for now, though.

Thanks and cheers,
Bernd

megacli64 reports CRITICAL on Battery state Optimal

I am getting the following

./check_raid.pl -p megacli -d

DEBUG EXEC: /usr/sbin/MegaCli64 -PDList -aALL -NoLog at ./check_raid.pl line 358.
DEBUG EXEC: /usr/sbin/MegaCli64 -LdInfo -Lall -aALL -NoLog at ./check_raid.pl line 358.
DEBUG EXEC: /usr/sbin/MegaCli64 -AdpBbuCmd -GetBbuStatus -aALL -NoLog at ./check_raid.pl line 358.
CRITICAL: megacli:[Volumes(7): DISK0.0:Optimal,DISK1.1:Optimal,DISK2.2:Optimal,DISK3.3:Optimal,DISK4.4:Optimal,DISK5.5:Optimal,DISK6.6:Optimal; Devices(8): 11,12,13,14,10,15,09,08=Online; Batteries(1): 0=Optimal] | Battery0=34;4073
Battery0:

  • State: Optimal
  • Missing: No
  • Replacement required: No
  • About to fail: No
  • Temperature: OK (34 C)
  • Voltage: OK (4073 mV)

I am working test data and a fix.

Battery backup unit (BBU) status

This plugin looks great, and I really like the modular nature. I would love to deploy this but it lacks one critical feature for me which is checking the state of an installed BBU (battery). Is this something that you consider adding in a future release for supported controllers?

arcconf and Adaptec ASR7805Q

hi,

I think the latest version of check_raid didn't know the arcconf output of a Adaptec ASR7805Q.

# ./check_raid.pl
NOT PARSED: [MaxCache 3.0 information] [Maxcache device number 100]
NOT PARSED: [MaxCache 3.0 information] [   Maxcache device name                     : Maxcache 0]
NOT PARSED: [MaxCache 3.0 information] [   MaxCache Dirty Status                    : Dirty]
NOT PARSED: [MaxCache 3.0 information] [   RAID level                               : 5]
NOT PARSED: [MaxCache 3.0 information] [   Background Coherency Check               : Inactive]
NOT PARSED: [MaxCache 3.0 information] [   Status of MaxCache                       : Optimal]
NOT PARSED: [MaxCache 3.0 information] [   Size                                     : 299990 MB]
NOT PARSED: [MaxCache 3.0 information] [   Stripe-unit size                         : 1024 KB]
NOT PARSED: [MaxCache 3.0 information] [   MaxCache write cache status              : On]
NOT PARSED: [MaxCache 3.0 information] [   Protected by Hot-Spare                   : No]
NOT PARSED: [MaxCache 3.0 information] [   Failed stripes                           : No]
NOT PARSED: [MaxCache 3.0 information] [   --------------------------------------------------------]
NOT PARSED: [MaxCache 3.0 information] [   Logical device segment information]
NOT PARSED: [MaxCache 3.0 information] [   --------------------------------------------------------]
NOT PARSED: [MaxCache 3.0 information] [   Segment 0                                : Present (Controller:1,Enclosure:0,Slot:0) xxxx]
NOT PARSED: [MaxCache 3.0 information] [   Segment 1                                : Present (Controller:1,Enclosure:0,Slot:1) xxxx]
NOT PARSED: [MaxCache 3.0 information] [   Segment 2                                : Present (Controller:1,Enclosure:0,Slot:2) xxxx]
Use of uninitialized value in string ne at ./check_raid.pl line 1984.
Use of uninitialized value in concatenation (.) or string at ./check_raid.pl line 1986.
Use of uninitialized value in concatenation (.) or string at ./check_raid.pl line 1989.
Use of uninitialized value in numeric lt (<) at ./check_raid.pl line 1990.
Use of uninitialized value in numeric lt (<) at ./check_raid.pl line 1993.
Use of uninitialized value in numeric lt (<) at ./check_raid.pl line 1997.
Use of uninitialized value in numeric lt (<) at ./check_raid.pl line 2000.
Use of uninitialized value in numeric lt (<) at ./check_raid.pl line 2004.
Use of uninitialized value in concatenation (.) or string at ./check_raid.pl line 2005.
CRITICAL: arcconf:[Controller:Optimal, Battery Status: Ready, Battery Overtemp: , Battery Capacity Remaining: %, Battery Time: m, Logical Device 0(OS):Optimal, Logical Device 1(SSDSTORAGEPOOL):Optimal, Logical Device 2(HDDSTORAGEPOOL):Optimal]

Here is the arcconf output

# arcconf GETCONFIG 1 AL
Controllers found: 1
----------------------------------------------------------------------
Controller information
----------------------------------------------------------------------
   Controller Status                        : Optimal
   Controller Mode                          : Default/RAID
   Channel description                      : SAS/SATA
   Controller Model                         : Adaptec ASR7805Q
   Controller Serial Number                 : xxxx
   Physical Slot                            : 3
   Temperature                              : 69 C/ 156 F (Normal)
   Installed memory                         : 1024 MB
   Copyback                                 : Disabled
   Background consistency check             : Disabled
   Automatic Failover                       : Enabled
   Global task priority                     : High
   Performance Mode                         : Default/Dynamic
   Host bus type                            : PCIe
   Host bus speed                           : 8000 MHz
   Hot bus link width                       : 8 bit(s)/link(s)
   Stayawake period                         : Disabled
   Spinup limit internal drives             : 0
   Spinup limit external drives             : 0
   Defunct disk drive count                 : 0
   Logical devices/Failed/Degraded          : 3/0/0
   MaxCache flush and fetch rate            : 100
   MaxCache Read, Write Balance Factor      : 3,1
   MaxCache Dirty Page Threshold            : 75
   NCQ status                               : Enabled
   Statistics data collection mode          : Disabled
   --------------------------------------------------------
   Controller Version Information
   --------------------------------------------------------
   BIOS                                     : 7.2-0 (30260)
   Firmware                                 : 7.2-0 (30260)
   Driver                                   : 1.2-1 (30200)
   Boot Flash                               : 7.2-0 (30260)

   --------------------------------------------------------
   Controller Cache Backup Unit Information
   --------------------------------------------------------

    Overall Backup Unit Status              : Ready

         Backup Unit Type                   : AFM-700/700LP
         Non-Volatile Storage Status        : Ready
         Supercap Status                    : Ready

         -----------------------------------
         Supercap Information               
         -----------------------------------
         Current Temperature                : 26 deg C
         Threshold Temperature              : 51 deg C
         Life-time Temperature Recorded     
         (Min/Max)                          : 24 deg C/ 42 deg C

         Voltage(Present/Max)               : 4920 mV/ 5302 mV
         Life-time Max Voltage Recorded     : 5428 mV

         Current Drawn(Present/Max)         : 0 mA/ 560 mA
         Health                             : 100 percent
         Charge Level                       : 100 percent
         Estimated Life-time                : 5 Years, 0 Month
         Serial Number                      : xxxx

----------------------------------------------------------------------
Logical device information
----------------------------------------------------------------------
Logical device number 0
   Logical device name                      : OS
   RAID level                               : 1
   Status of logical device                 : Optimal
   Size                                     : 114290 MB
   Parity space                             : 114300 MB
   Read-cache setting                       : Disabled
   Read-cache status                        : Off
   Write-cache setting                      : Disabled
   Write-cache status                       : Off
   MaxCache read cache setting              : Disabled
   MaxCache read cache status               : Off
   MaxCache write cache setting             : Disabled
   MaxCache write cache status              : Off
   Partitioned                              : Yes
   Protected by Hot-Spare                   : No
   Bootable                                 : Yes
   Failed stripes                           : No
   Power settings                           : Disabled
   --------------------------------------------------------
   Logical device segment information
   --------------------------------------------------------
   Segment 0                                : Present (Controller:1,Enclosure:0,Slot:22) S19HNSAD431909K
   Segment 1                                : Present (Controller:1,Enclosure:0,Slot:23) S19HNSAD431789J

Logical device number 1
   Logical device name                      : SSDSTORAGEPOOL
   RAID level                               : 5
   Status of logical device                 : Optimal
   Size                                     : 674838 MB
   Parity space                             : 337424 MB
   Stripe-unit size                         : 256 KB
   Read-cache setting                       : Disabled
   Read-cache status                        : Off
   Write-cache setting                      : Disabled
   Write-cache status                       : Off
   MaxCache read cache setting              : Disabled
   MaxCache read cache status               : Off
   MaxCache write cache setting             : Disabled
   MaxCache write cache status              : Off
   Partitioned                              : No
   Protected by Hot-Spare                   : No
   Bootable                                 : No
   Failed stripes                           : No
   Power settings                           : Disabled
   --------------------------------------------------------
   Logical device segment information
   --------------------------------------------------------
   Segment 0                                : Present (Controller:1,Enclosure:0,Slot:0) xxxx
   Segment 1                                : Present (Controller:1,Enclosure:0,Slot:1) xxxx
   Segment 2                                : Present (Controller:1,Enclosure:0,Slot:2) xxxx

Logical device number 2
   Logical device name                      : HDDSTORAGEPOOL
   RAID level                               : 5
   Status of logical device                 : Optimal
   MaxCache Status                          : Dirty
   Size                                     : 4766710 MB
   Parity space                             : 953344 MB
   Stripe-unit size                         : 256 KB
   Read-cache setting                       : Enabled
   Read-cache status                        : On
   Write-cache setting                      : Enabled
   Write-cache status                       : On
   MaxCache read cache setting              : Enabled
   MaxCache read cache status               : On
   MaxCache write cache setting             : Enabled
   MaxCache write cache status              : On
   MaxCache write cache policy              : Write Back
   Partitioned                              : No
   Protected by Hot-Spare                   : No
   Bootable                                 : No
   Failed stripes                           : No
   Power settings                           : Disabled
   --------------------------------------------------------
   Logical device segment information
   --------------------------------------------------------
   Segment 0                                : Present (Controller:1,Enclosure:0,Slot:3) xxxx
   Segment 1                                : Present (Controller:1,Enclosure:0,Slot:4) xxxx
   Segment 2                                : Present (Controller:1,Enclosure:0,Slot:5) xxxx
   Segment 3                                : Present (Controller:1,Enclosure:0,Slot:6) xxxx
   Segment 4                                : Present (Controller:1,Enclosure:0,Slot:7) xxxx
   Segment 5                                : Present (Controller:1,Enclosure:0,Slot:8) xxxx


----------------------------------------------------------------------
Physical Device information
----------------------------------------------------------------------
      Device #0
         Device is a Hard drive
         State                              : Online
         Supported                          : Yes
         Transfer Speed                     : SATA 6.0 Gb/s
         Reported Channel,Device(T:L)       : 0,8(8:0)
         Reported Location                  : Enclosure 0, Slot 0
         Reported ESD(T:L)                  : 2,0(0:0)
         Vendor                             : ATA
         Model                              : Samsung SSD 840
         Firmware                           : DXM05B0Q
         Serial number                      : xxxx
         Reserved Size                      : 985368 KB
         Used Size                          : 487424 MB
         Unused Size                        : 64 KB
         Total Size                         : 488386 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off
         SSD                                : Yes
         NCQ status                         : Enabled
      Device #1
         Device is a Hard drive
         State                              : Online
         Supported                          : Yes
         Transfer Speed                     : SATA 6.0 Gb/s
         Reported Channel,Device(T:L)       : 0,9(9:0)
         Reported Location                  : Enclosure 0, Slot 1
         Reported ESD(T:L)                  : 2,0(0:0)
         Vendor                             : ATA
         Model                              : Samsung SSD 840
         Firmware                           : DXM05B0Q
         Serial number                      : xxxx
         Reserved Size                      : 985368 KB
         Used Size                          : 487424 MB
         Unused Size                        : 64 KB
         Total Size                         : 488386 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off
         SSD                                : Yes
         NCQ status                         : Enabled
      Device #2
         Device is a Hard drive
         State                              : Online
         Supported                          : Yes
         Transfer Speed                     : SATA 6.0 Gb/s
         Reported Channel,Device(T:L)       : 0,10(10:0)
         Reported Location                  : Enclosure 0, Slot 2
         Reported ESD(T:L)                  : 2,0(0:0)
         Vendor                             : ATA
         Model                              : Samsung SSD 840
         Firmware                           : DXM05B0Q
         Serial number                      : xxxx
         Reserved Size                      : 985368 KB
         Used Size                          : 487424 MB
         Unused Size                        : 64 KB
         Total Size                         : 488386 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off
         SSD                                : Yes
         NCQ status                         : Enabled
      Device #3
         Device is a Hard drive
         State                              : Online
         Supported                          : Yes
         Transfer Speed                     : SAS 6.0 Gb/s
         Reported Channel,Device(T:L)       : 0,11(11:0)
         Reported Location                  : Enclosure 0, Slot 3
         Reported ESD(T:L)                  : 2,0(0:0)
         Vendor                             : SEAGATE
         Model                              : ST91000640SS
         Firmware                           : 0004
         Serial number                      : xxxx
         World-wide name                    : 5000C50056B3D3A4
         Reserved Size                      : 538264 KB
         Used Size                          : 953344 MB
         Unused Size                        : 64 KB
         Total Size                         : 953869 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off,Reduced rpm
         SSD                                : No
      Device #4
         Device is a Hard drive
         State                              : Online
         Supported                          : Yes
         Transfer Speed                     : SAS 6.0 Gb/s
         Reported Channel,Device(T:L)       : 0,12(12:0)
         Reported Location                  : Enclosure 0, Slot 4
         Reported ESD(T:L)                  : 2,0(0:0)
         Vendor                             : SEAGATE
         Model                              : ST91000640SS
         Firmware                           : 0004
         Serial number                      : xxxx
         World-wide name                    : 5000C50056B3E2B8
         Reserved Size                      : 538264 KB
         Used Size                          : 953344 MB
         Unused Size                        : 64 KB
         Total Size                         : 953869 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off,Reduced rpm
         SSD                                : No
      Device #5
         Device is a Hard drive
         State                              : Online
         Supported                          : Yes
         Transfer Speed                     : SAS 6.0 Gb/s
         Reported Channel,Device(T:L)       : 0,13(13:0)
         Reported Location                  : Enclosure 0, Slot 5
         Reported ESD(T:L)                  : 2,0(0:0)
         Vendor                             : SEAGATE
         Model                              : ST91000640SS
         Firmware                           : 0004
         Serial number                      : xxxx
         World-wide name                    : 5000C50056AE3C90
         Reserved Size                      : 538264 KB
         Used Size                          : 953344 MB
         Unused Size                        : 64 KB
         Total Size                         : 953869 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off,Reduced rpm
         SSD                                : No
      Device #6
         Device is a Hard drive
         State                              : Online
         Supported                          : Yes
         Transfer Speed                     : SAS 6.0 Gb/s
         Reported Channel,Device(T:L)       : 0,14(14:0)
         Reported Location                  : Enclosure 0, Slot 6
         Reported ESD(T:L)                  : 2,0(0:0)
         Vendor                             : SEAGATE
         Model                              : ST91000640SS
         Firmware                           : 0004
         Serial number                      : xxxx
         World-wide name                    : 5000C50056AE4034
         Reserved Size                      : 538264 KB
         Used Size                          : 953344 MB
         Unused Size                        : 64 KB
         Total Size                         : 953869 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off,Reduced rpm
         SSD                                : No
      Device #7
         Device is a Hard drive
         State                              : Online
         Supported                          : Yes
         Transfer Speed                     : SAS 6.0 Gb/s
         Reported Channel,Device(T:L)       : 0,15(15:0)
         Reported Location                  : Enclosure 0, Slot 7
         Reported ESD(T:L)                  : 2,0(0:0)
         Vendor                             : SEAGATE
         Model                              : ST91000640SS
         Firmware                           : 0004
         Serial number                      : xxxx
         World-wide name                    : 5000C50056B3D450
         Reserved Size                      : 538264 KB
         Used Size                          : 953344 MB
         Unused Size                        : 64 KB
         Total Size                         : 953869 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off,Reduced rpm
         SSD                                : No
      Device #8
         Device is a Hard drive
         State                              : Online
         Supported                          : Yes
         Transfer Speed                     : SAS 6.0 Gb/s
         Reported Channel,Device(T:L)       : 0,16(16:0)
         Reported Location                  : Enclosure 0, Slot 8
         Reported ESD(T:L)                  : 2,0(0:0)
         Vendor                             : SEAGATE
         Model                              : ST91000640SS
         Firmware                           : 0004
         Serial number                      : xxxx
         World-wide name                    : 5000C50056B3D87C
         Reserved Size                      : 538264 KB
         Used Size                          : 953344 MB
         Unused Size                        : 64 KB
         Total Size                         : 953869 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off,Reduced rpm
         SSD                                : No
      Device #9
         Device is a Hard drive
         State                              : Online
         Supported                          : Yes
         Transfer Speed                     : SATA 6.0 Gb/s
         Reported Channel,Device(T:L)       : 0,30(30:0)
         Reported Location                  : Enclosure 0, Slot 22
         Reported ESD(T:L)                  : 2,0(0:0)
         Vendor                             : ATA
         Model                              : Samsung SSD 840
         Firmware                           : DXT08B0Q
         Serial number                      : xxxx
         Reserved Size                      : 177560 KB
         Used Size                          : 114300 MB
         Unused Size                        : 64 KB
         Total Size                         : 114473 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off
         SSD                                : Yes
         NCQ status                         : Enabled
      Device #10
         Device is a Hard drive
         State                              : Online
         Supported                          : Yes
         Transfer Speed                     : SATA 6.0 Gb/s
         Reported Channel,Device(T:L)       : 0,31(31:0)
         Reported Location                  : Enclosure 0, Slot 23
         Reported ESD(T:L)                  : 2,0(0:0)
         Vendor                             : ATA
         Model                              : Samsung SSD 840
         Firmware                           : DXT08B0Q
         Serial number                      : xxxx
         Reserved Size                      : 177560 KB
         Used Size                          : 114300 MB
         Unused Size                        : 64 KB
         Total Size                         : 114473 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off
         SSD                                : Yes
         NCQ status                         : Enabled
      Device #11
         Device is an Enclosure services device
         Reported Channel,Device(T:L)       : 2,0(0:0)
         Enclosure ID                       : 0
         Type                               : SES2
         Vendor                             : LSI
         Model                              : SAS2X36
         Firmware                           : 0e0b
         Status of Enclosure services device
            Fan 1 status                    : 0 rpm (Not available)
            Fan 2 status                    : 0 rpm (Not available)
            Fan 3 status                    : 0 rpm (Not available)
            Temperature Sensor Status 1     : 21 C/ 69 F (Normal)
            Speaker status                  : Not available

----------------------------------------------------------------------
MaxCache 3.0 information
----------------------------------------------------------------------
Maxcache device number 100
   Maxcache device name                     : Maxcache 0
   MaxCache Dirty Status                    : Dirty
   RAID level                               : 5
   Background Coherency Check               : Inactive
   Status of MaxCache                       : Optimal
   Size                                     : 299990 MB
   Stripe-unit size                         : 1024 KB
   MaxCache write cache status              : On
   Protected by Hot-Spare                   : No
   Failed stripes                           : No
   --------------------------------------------------------
   Logical device segment information
   --------------------------------------------------------
   Segment 0                                : Present (Controller:1,Enclosure:0,Slot:0) xxxx
   Segment 1                                : Present (Controller:1,Enclosure:0,Slot:1) xxxx
   Segment 2                                : Present (Controller:1,Enclosure:0,Slot:2) xxxx



Command completed successfully.
# arcconf GETSTATUS 1
Controllers found: 1
   Current operation              : None

Command completed successfully.

mpt unparsed on SAS1068 PCI-X Fusion-MPT SAS

Hi,

There seems to be a parsing issue of the mpt-status output on some systems. Version 1.2.0-7 of mpt-status is installed. Used hardware is a Dell PowerEdge SC1435, containing SAS1068 PCI-X Fusion-MPT SAS controller. Same thing happens on a SAS1068E PCI-Express Fusion-MPT SAS of a Dell R300.

$ /usr/lib/nagios/plugins/check_raid
mpt unparsed: [ioc0 phy 1 scsi_id 32 ATA WDC WD2500JS-75N 2E04, 232 GB, state ONLINE, flags NONE]
mpt unparsed: [ioc0 phy 0 scsi_id 1 ATA WDC WD2500JS-75N 2E04, 232 GB, state ONLINE, flags NONE]
UNKNOWN: mpt:[Volume 0 (RAID-1, 2 disks, 231 GiB): OPTIMAL]

$ mpt-status
ioc0 vol_id 0 type IM, 2 phy, 231 GB, state OPTIMAL, flags ENABLED
ioc0 phy 1 scsi_id 32 ATA WDC WD2500JS-75N 2E04, 232 GB, state ONLINE, flags NONE
ioc0 phy 0 scsi_id 1 ATA WDC WD2500JS-75N 2E04, 232 GB, state ONLINE, flags NONE

$ mpt-status -n
ioc:0 vol_id:0 type:IM raidlevel:RAID-1 num_disks:2 size(GB):231 state: OPTIMAL flags: ENABLED
ioc:0 phys_id:1 scsi_id:32 vendor:ATA product_id:WDC WD2500JS-75N revision:2E04 size(GB):232 state: ONLINE flags: NONE sync_state: 100 ASC/ASCQ:0x11/0x00 SMART ASC/ASCQ:0xff/0xff
ioc:0 phys_id:0 scsi_id:1 vendor:ATA product_id:WDC WD2500JS-75N revision:2E04 size(GB):232 state: ONLINE flags: NONE sync_state: 100 ASC/ASCQ:0x11/0x00 SMART ASC/ASCQ:0xff/0xff
scsi_id:1 100%
scsi_id:0 100%

Many thanks for these plugins!

Cheers

mdadm plugin fails

The mdadm plugin fails when there are no raid devices, but /proc/mdstat exists.
This occurs in (at least) vanilla Ubuntu server 12.04.
Example of /proc/mdstat:

$ more /proc/mdstat
Personalities : 
unused devices: <none>

Example of error:

$ ./check_raid.pl
UNKNOWN: mdstat:[Plugin error]

A simple fix may be to skip the check:

$ git diff
diff --git a/check_raid.pl b/check_raid.pl
index d082937..acb0238 100755
--- a/check_raid.pl
+++ b/check_raid.pl
@@ -547,7 +547,8 @@ sub check {
                push(@status, $s);
        }

-       return unless @status;
+#      The following would return a Plugin error when no devices are found
+#      return unless @status;

        # denote this plugin as ran ok
        $this->ok;

Another option would be to replace the "return unless @status" with something that would check if there exists at least 1 mdadm raid device.

Hope this is useful,
  Alex

Allow for plugin specific options

Hello,

it would be great if parameters could be passed to the plugins, eg. via GetOptionsFromString() to allow parsing extra options of the plugins.

This would allow enabeleing, setting parameters and disabeling of plugin features (e.g. disable MegaCli BBU Monitoring). Having a general infrastrucure for this, would be great.

Regards,
Robert

Critical output

Hi, I do not understand why this CRITICAL output:

check_raid.pl -dp arcconf
DEBUG EXEC: /usr/local/bin/arcconf GETSTATUS 1 at ./check_raid.pl line 435.
DEBUG EXEC: /usr/local/bin/arcconf GETCONFIG 1 AL at ./check_raid.pl line 435.
CRITICAL: arcconf:[Controller:Optimal, ZMM Status: ZMM Optimal, Logical Device 0(Sistem):Optimal, Logical Device 1(raid900):Optimal, Logical Device 2(raid200):Optimal, Logical Device 3(raid2t):Optimal, Drives: MK0A31YHGLL0PD,MK0A31YHGLTNWA,3SJ259VW000091089A3K,MK0A31YHGLWK8A=Global Hot-Spare Z1N00XW50000S137KQKX,Z1N00RXM0000S129YCCA,Z1N01CTZ0000S12986FZ,Z1N00TT60000S127K929,3SJ261NE00009108HSF0,3SJ2635B00009107H872,3SJ25CQ600009105PZTP,3SJ262DQ00009107Z22T,3SJ262ES000091089AWR,3SJ261K500009107H72P,3SJ25888000091089D3W,3SJ244YZ00009107YVX3,3SJ256L600009107Y5XD,3SJ25G4N000091089DCA,MK0A31YHGLUS7A,MK0A31YHGLBSTA,MK0A31YHGLU1ZA,MK0A31YHGLT00A,MK0A31YHGM418A,MK0A31YHGLT81A=Online 3SJ2623W00009107YSLV,3NM6XQ2000009905VXVY,3NM5YMFH00009847P9SA,3NM6XPV600009905VY0C,3SD0MT2200009951TXVQ,3SD0M84700009950NH7Y,3NM6XPSQ00009905ULQL=Ready]
arcconf GETSTATUS 1
Controllers found: 1
   Current operation              : None

Command completed successfully.
arcconf GETCONFIG 1 AL
Controllers found: 1
----------------------------------------------------------------------
Controller information
----------------------------------------------------------------------
   Controller Status                        : Optimal
   Channel description                      : SAS/SATA
   Controller Model                         : Adaptec 6805
   Controller Serial Number                 : 1A15119C716
   Physical Slot                            : 6
   Temperature                              : 45 C/ 113 F (Normal)
   Installed memory                         : 512 MB
   Copyback                                 : Disabled
   Background consistency check             : Disabled
   Automatic Failover                       : Enabled
   Global task priority                     : High
   Performance Mode                         : Default/Dynamic
   Host bus type                            : PCIe
   Host bus speed                           : 5000 MHz
   Hot bus link width                       : 8 bit(s)/link(s)
   Stayawake period                         : Disabled
   Spinup limit internal drives             : 0
   Spinup limit external drives             : 0
   Defunct disk drive count                 : 0
   Logical devices/Failed/Degraded          : 5/0/0
   NCQ status                               : Enabled
   Statistics data collection mode          : Enabled
   --------------------------------------------------------
   Controller Version Information
   --------------------------------------------------------
   BIOS                                     : 5.2-0 (19109)
   Firmware                                 : 5.2-0 (19109)
   Driver                                   : 1.1-7 (28000)
   Boot Flash                               : 5.2-0 (19109)
   --------------------------------------------------------
   Controller ZMM Information
   --------------------------------------------------------
   Status                                   : ZMM Optimal

----------------------------------------------------------------------
Logical device information
----------------------------------------------------------------------
Logical device number 0
   Logical device name                      : Sistem
   RAID level                               : 0
   Status of logical device                 : Optimal
   Size                                     : 571382 MB
   Parity space                             : 0 MB
   Stripe-unit size                         : 1024 KB
   Read-cache setting                       : Enabled
   Read-cache status                        : On
   Write-cache setting                      : Enabled
   Write-cache status                       : On
   Partitioned                              : Yes
   Protected by Hot-Spare                   : No
   Global Hot-Spare                         : 0,36
   Global Hot-Spare                         : 0,10
   Global Hot-Spare                         : 0,9
   Global Hot-Spare                         : 0,43
   Bootable                                 : Yes
   Failed stripes                           : No
   Power settings                           : Disabled
   --------------------------------------------------------
   Logical device segment information
   --------------------------------------------------------
   Segment 0                                : Present (Controller:1,Enclosure:1,Slot:6) 3SJ261NE00009108HSF0
   Segment 1                                : Present (Controller:1,Enclosure:1,Slot:7) 3SJ2635B00009107H872

Logical device number 1
   Logical device name                      : raid900
   RAID level                               : 10
   Status of logical device                 : Optimal
   Size                                     : 1906678 MB
   Parity space                             : 1906688 MB
   Stripe-unit size                         : 1024 KB
   Read-cache setting                       : Enabled
   Read-cache status                        : On
   Write-cache setting                      : Enabled
   Write-cache status                       : On
   Partitioned                              : Yes
   Protected by Hot-Spare                   : Yes
   Global Hot-Spare                         : 0,10
   Global Hot-Spare                         : 0,9
   Global Hot-Spare                         : 0,43
   Bootable                                 : No
   Failed stripes                           : No
   Power settings                           : Disabled
   --------------------------------------------------------
   Logical device segment information
   --------------------------------------------------------
   Group 0, Segment 0                       : Present (Controller:1,Enclosure:1,Slot:2) Z1N00XW50000S137KQKX
   Group 0, Segment 1                       : Present (Controller:1,Enclosure:1,Slot:3) Z1N00RXM0000S129YCCA
   Group 1, Segment 0                       : Present (Controller:1,Enclosure:1,Slot:4) Z1N01CTZ0000S12986FZ
   Group 1, Segment 1                       : Present (Controller:1,Enclosure:1,Slot:5) Z1N00TT60000S127K929

Logical device number 2
   Logical device name                      : raid200
   RAID level                               : 10
   Status of logical device                 : Optimal
   Size                                     : 1142774 MB
   Parity space                             : 1142784 MB
   Stripe-unit size                         : 1024 KB
   Read-cache setting                       : Enabled
   Read-cache status                        : On
   Write-cache setting                      : Enabled
   Write-cache status                       : On
   Partitioned                              : Yes
   Protected by Hot-Spare                   : Yes
   Global Hot-Spare                         : 0,36
   Global Hot-Spare                         : 0,10
   Global Hot-Spare                         : 0,9
   Global Hot-Spare                         : 0,43
   Bootable                                 : No
   Failed stripes                           : No
   Power settings                           : Disabled
   --------------------------------------------------------
   Logical device segment information
   --------------------------------------------------------
   Group 0, Segment 0                       : Present (Controller:1,Enclosure:1,Slot:8) 3SJ25CQ600009105PZTP
   Group 0, Segment 1                       : Present (Controller:1,Enclosure:1,Slot:9) 3SJ262DQ00009107Z22T
   Group 1, Segment 0                       : Present (Controller:1,Enclosure:1,Slot:10) 3SJ262ES000091089AWR
   Group 1, Segment 1                       : Present (Controller:1,Enclosure:1,Slot:11) 3SJ261K500009107H72P
   Group 2, Segment 0                       : Present (Controller:1,Enclosure:1,Slot:12) 3SJ25888000091089D3W
   Group 2, Segment 1                       : Present (Controller:1,Enclosure:1,Slot:13) 3SJ244YZ00009107YVX3
   Group 3, Segment 0                       : Present (Controller:1,Enclosure:1,Slot:14) 3SJ256L600009107Y5XD
   Group 3, Segment 1                       : Present (Controller:1,Enclosure:1,Slot:15) 3SJ25G4N000091089DCA

Logical device number 3
   Logical device name                      : raid2t
   RAID level                               : 10
   Status of logical device                 : Optimal
   Size                                     : 5713910 MB
   Parity space                             : 5713920 MB
   Stripe-unit size                         : 1024 KB
   Read-cache setting                       : Enabled
   Read-cache status                        : On
   Write-cache setting                      : Enabled
   Write-cache status                       : On
   Partitioned                              : Yes
   Protected by Hot-Spare                   : Yes
   Global Hot-Spare                         : 0,10
   Global Hot-Spare                         : 0,9
   Global Hot-Spare                         : 0,43
   Bootable                                 : No
   Failed stripes                           : No
   Power settings                           : Disabled
   --------------------------------------------------------
   Logical device segment information
   --------------------------------------------------------
   Group 0, Segment 0                       : Present (Controller:1,Enclosure:1,Slot:17)       MK0A31YHGLUS7A
   Group 0, Segment 1                       : Present (Controller:1,Enclosure:1,Slot:18)       MK0A31YHGLBSTA
   Group 1, Segment 0                       : Present (Controller:1,Enclosure:1,Slot:19)       MK0A31YHGLU1ZA
   Group 1, Segment 1                       : Present (Controller:1,Enclosure:1,Slot:20)       MK0A31YHGLT00A
   Group 2, Segment 0                       : Present (Controller:1,Enclosure:1,Slot:21)       MK0A31YHGM418A
   Group 2, Segment 1                       : Present (Controller:1,Enclosure:1,Slot:22)       MK0A31YHGLT81A

   No logical devices configured

----------------------------------------------------------------------
Physical Device information
----------------------------------------------------------------------
      Device #0
         Device is a Hard drive
         State                              : Ready
         Supported                          : Yes
         Transfer Speed                     : SAS 6.0 Gb/s
         Reported Channel,Device(T:L)       : 0,8(8:0)
         Reported Location                  : Enclosure 0, Slot 0
         Reported ESD(T:L)                  : 2,0(0:0)
         Vendor                             : SEAGATE
         Model                              : ST3300657SS
         Firmware                           : 0006
         Serial number                      : 3SJ2623W00009107YSLV
         World-wide name                    : 5000C50028400978
         Reserved Size                      : 416046 KB
         Used Size                          : 0 MB
         Unused Size                        : 285696 MB
         Total Size                         : 286102 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off
         SSD                                : No
      Device #1
         Device is a Hard drive
         State                              : Global Hot-Spare
         Supported                          : Yes
         Transfer Speed                     : SATA 6.0 Gb/s
         Reported Channel,Device(T:L)       : 0,9(9:0)
         Reported Location                  : Enclosure 0, Slot 1
         Reported ESD(T:L)                  : 2,0(0:0)
         Vendor                             : Hitachi
         Model                              : HUA723020ALA640
         Firmware                           : MK7OA5C0
         Serial number                      : MK0A31YHGLL0PD
         Reserved Size                      : 3163160 KB
         Used Size                          : 1904640 MB
         Unused Size                        : 64 KB
         Total Size                         : 1907729 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off,Reduced rpm
         SSD                                : No
         NCQ status                         : Enabled
      Device #2
         Device is a Hard drive
         State                              : Global Hot-Spare
         Supported                          : Yes
         Transfer Speed                     : SATA 6.0 Gb/s
         Reported Channel,Device(T:L)       : 0,10(10:0)
         Reported Location                  : Enclosure 0, Slot 2
         Reported ESD(T:L)                  : 2,0(0:0)
         Vendor                             : Hitachi
         Model                              : HUA723020ALA640
         Firmware                           : MK7OA5C0
         Serial number                      : MK0A31YHGLTNWA
         Reserved Size                      : 3163160 KB
         Used Size                          : 1904640 MB
         Unused Size                        : 64 KB
         Total Size                         : 1907729 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off,Reduced rpm
         SSD                                : No
         NCQ status                         : Enabled
      Device #3
         Device is a Hard drive
         State                              : Ready
         Supported                          : Yes
         Transfer Speed                     : SAS 3.0 Gb/s
         Reported Channel,Device(T:L)       : 0,11(11:0)
         Reported Location                  : Enclosure 0, Slot 3
         Reported ESD(T:L)                  : 2,0(0:0)
         Vendor                             : SEAGATE
         Model                              : ST9146802SS
         Firmware                           : 0003
         Serial number                      : 3NM6XQ2000009905VXVY
         World-wide name                    : 5000C5000CA1E1E0
         Reserved Size                      : 98304 KB
         Used Size                          : 0 MB
         Unused Size                        : 139918 MB
         Total Size                         : 140014 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off
         SSD                                : No
      Device #4
         Device is a Hard drive
         State                              : Ready
         Supported                          : Yes
         Transfer Speed                     : SAS 3.0 Gb/s
         Reported Channel,Device(T:L)       : 0,12(12:0)
         Reported Location                  : Enclosure 0, Slot 4
         Reported ESD(T:L)                  : 2,0(0:0)
         Vendor                             : SEAGATE
         Model                              : ST9146802SS
         Firmware                           : 0003
         Serial number                      : 3NM5YMFH00009847P9SA
         World-wide name                    : 5000C5000CA1B774
         Reserved Size                      : 117144 KB
         Used Size                          : 0 MB
         Unused Size                        : 139900 MB
         Total Size                         : 140014 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off
         SSD                                : No
      Device #5
         Device is a Hard drive
         State                              : Ready
         Supported                          : Yes
         Transfer Speed                     : SAS 3.0 Gb/s
         Reported Channel,Device(T:L)       : 0,13(13:0)
         Reported Location                  : Enclosure 0, Slot 5
         Reported ESD(T:L)                  : 2,0(0:0)
         Vendor                             : SEAGATE
         Model                              : ST9146802SS
         Firmware                           : 0003
         Serial number                      : 3NM6XPV600009905VY0C
         World-wide name                    : 5000C5000CA1E298
         Reserved Size                      : 98304 KB
         Used Size                          : 0 MB
         Unused Size                        : 139918 MB
         Total Size                         : 140014 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off
         SSD                                : No
      Device #6
         Device is a Hard drive
         State                              : Ready
         Supported                          : Yes
         Transfer Speed                     : SAS 6.0 Gb/s
         Reported Channel,Device(T:L)       : 0,14(14:0)
         Reported Location                  : Enclosure 0, Slot 6
         Reported ESD(T:L)                  : 2,0(0:0)
         Vendor                             : SEAGATE
         Model                              : ST9146803SS
         Firmware                           : 0004
         Serial number                      : 3SD0MT2200009951TXVQ
         World-wide name                    : 5000C500132E29C0
         Reserved Size                      : 117144 KB
         Used Size                          : 0 MB
         Unused Size                        : 139900 MB
         Total Size                         : 140014 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off
         SSD                                : No
      Device #7
         Device is a Hard drive
         State                              : Ready
         Supported                          : Yes
         Transfer Speed                     : SAS 6.0 Gb/s
         Reported Channel,Device(T:L)       : 0,15(15:0)
         Reported Location                  : Enclosure 0, Slot 7
         Reported ESD(T:L)                  : 2,0(0:0)
         Vendor                             : SEAGATE
         Model                              : ST9146803SS
         Firmware                           : 0004
         Serial number                      : 3SD0M84700009950NH7Y
         World-wide name                    : 5000C500132E2AB0
         Reserved Size                      : 117144 KB
         Used Size                          : 0 MB
         Unused Size                        : 139900 MB
         Total Size                         : 140014 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off
         SSD                                : No
      Device #8
         Device is a Hard drive
         State                              : Ready
         Supported                          : Yes
         Transfer Speed                     : SAS 3.0 Gb/s
         Reported Channel,Device(T:L)       : 0,16(16:0)
         Reported Location                  : Enclosure 0, Slot 8
         Reported ESD(T:L)                  : 2,0(0:0)
         Vendor                             : SEAGATE
         Model                              : ST9146802SS
         Firmware                           : 0003
         Serial number                      : 3NM6XPSQ00009905ULQL
         World-wide name                    : 5000C5000CA1DDA0
         Reserved Size                      : 117144 KB
         Used Size                          : 0 MB
         Unused Size                        : 139900 MB
         Total Size                         : 140014 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off
         SSD                                : No
      Device #9
         Device is a Hard drive
         State                              : Online
         Supported                          : Yes
         Transfer Speed                     : SAS 6.0 Gb/s
         Reported Channel,Device(T:L)       : 0,22(22:0)
         Reported Location                  : Enclosure 1, Slot 2
         Reported ESD(T:L)                  : 2,1(1:0)
         Vendor                             : SEAGATE
         Model                              : ST1000NM0001
         Firmware                           : 0001
         Serial number                      : Z1N00XW50000S137KQKX
         World-wide name                    : 5000C500343FEE64
         Reserved Size                      : 538264 KB
         Used Size                          : 953344 MB
         Unused Size                        : 64 KB
         Total Size                         : 953869 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off
         SSD                                : No
      Device #10
         Device is a Hard drive
         State                              : Online
         Supported                          : Yes
         Transfer Speed                     : SAS 6.0 Gb/s
         Reported Channel,Device(T:L)       : 0,23(23:0)
         Reported Location                  : Enclosure 1, Slot 3
         Reported ESD(T:L)                  : 2,1(1:0)
         Vendor                             : SEAGATE
         Model                              : ST1000NM0001
         Firmware                           : 0001
         Serial number                      : Z1N00RXM0000S129YCCA
         World-wide name                    : 5000C500341BCE8C
         Reserved Size                      : 538264 KB
         Used Size                          : 953344 MB
         Unused Size                        : 64 KB
         Total Size                         : 953869 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off
         SSD                                : No
      Device #11
         Device is a Hard drive
         State                              : Online
         Supported                          : Yes
         Transfer Speed                     : SAS 6.0 Gb/s
         Reported Channel,Device(T:L)       : 0,24(24:0)
         Reported Location                  : Enclosure 1, Slot 4
         Reported ESD(T:L)                  : 2,1(1:0)
         Vendor                             : SEAGATE
         Model                              : ST1000NM0001
         Firmware                           : 0001
         Serial number                      : Z1N01CTZ0000S12986FZ
         World-wide name                    : 5000C5003425B204
         Reserved Size                      : 538264 KB
         Used Size                          : 953344 MB
         Unused Size                        : 64 KB
         Total Size                         : 953869 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off
         SSD                                : No
      Device #12
         Device is a Hard drive
         State                              : Online
         Supported                          : Yes
         Transfer Speed                     : SAS 6.0 Gb/s
         Reported Channel,Device(T:L)       : 0,25(25:0)
         Reported Location                  : Enclosure 1, Slot 5
         Reported ESD(T:L)                  : 2,1(1:0)
         Vendor                             : SEAGATE
         Model                              : ST1000NM0001
         Firmware                           : 0001
         Serial number                      : Z1N00TT60000S127K929
         World-wide name                    : 5000C500341BD578
         Reserved Size                      : 538264 KB
         Used Size                          : 953344 MB
         Unused Size                        : 64 KB
         Total Size                         : 953869 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off
         SSD                                : No
      Device #13
         Device is a Hard drive
         State                              : Online
         Supported                          : Yes
         Transfer Speed                     : SAS 6.0 Gb/s
         Reported Channel,Device(T:L)       : 0,26(26:0)
         Reported Location                  : Enclosure 1, Slot 6
         Reported ESD(T:L)                  : 2,1(1:0)
         Vendor                             : SEAGATE
         Model                              : ST3300657SS
         Firmware                           : 0006
         Serial number                      : 3SJ261NE00009108HSF0
         World-wide name                    : 5000C50028404C3C
         Reserved Size                      : 415982 KB
         Used Size                          : 285696 MB
         Unused Size                        : 64 KB
         Total Size                         : 286102 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off
         SSD                                : No
      Device #14
         Device is a Hard drive
         State                              : Online
         Supported                          : Yes
         Transfer Speed                     : SAS 6.0 Gb/s
         Reported Channel,Device(T:L)       : 0,27(27:0)
         Reported Location                  : Enclosure 1, Slot 7
         Reported ESD(T:L)                  : 2,1(1:0)
         Vendor                             : SEAGATE
         Model                              : ST3300657SS
         Firmware                           : 0006
         Serial number                      : 3SJ2635B00009107H872
         World-wide name                    : 5000C500241FCF88
         Reserved Size                      : 415982 KB
         Used Size                          : 285696 MB
         Unused Size                        : 64 KB
         Total Size                         : 286102 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off
         SSD                                : No
      Device #15
         Device is a Hard drive
         State                              : Online
         Supported                          : Yes
         Transfer Speed                     : SAS 6.0 Gb/s
         Reported Channel,Device(T:L)       : 0,28(28:0)
         Reported Location                  : Enclosure 1, Slot 8
         Reported ESD(T:L)                  : 2,1(1:0)
         Vendor                             : SEAGATE
         Model                              : ST3300657SS
         Firmware                           : 0006
         Serial number                      : 3SJ25CQ600009105PZTP
         World-wide name                    : 5000C500241FF230
         Reserved Size                      : 415982 KB
         Used Size                          : 285696 MB
         Unused Size                        : 64 KB
         Total Size                         : 286102 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off
         SSD                                : No
      Device #16
         Device is a Hard drive
         State                              : Online
         Supported                          : Yes
         Transfer Speed                     : SAS 6.0 Gb/s
         Reported Channel,Device(T:L)       : 0,29(29:0)
         Reported Location                  : Enclosure 1, Slot 9
         Reported ESD(T:L)                  : 2,1(1:0)
         Vendor                             : SEAGATE
         Model                              : ST3300657SS
         Firmware                           : 0006
         Serial number                      : 3SJ262DQ00009107Z22T
         World-wide name                    : 5000C50028401DB8
         Reserved Size                      : 415982 KB
         Used Size                          : 285696 MB
         Unused Size                        : 64 KB
         Total Size                         : 286102 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off
         SSD                                : No
      Device #17
         Device is a Hard drive
         State                              : Online
         Supported                          : Yes
         Transfer Speed                     : SAS 6.0 Gb/s
         Reported Channel,Device(T:L)       : 0,30(30:0)
         Reported Location                  : Enclosure 1, Slot 10
         Reported ESD(T:L)                  : 2,1(1:0)
         Vendor                             : SEAGATE
         Model                              : ST3300657SS
         Firmware                           : 0006
         Serial number                      : 3SJ262ES000091089AWR
         World-wide name                    : 5000C500284021C4
         Reserved Size                      : 415982 KB
         Used Size                          : 285696 MB
         Unused Size                        : 64 KB
         Total Size                         : 286102 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off
         SSD                                : No
      Device #18
         Device is a Hard drive
         State                              : Online
         Supported                          : Yes
         Transfer Speed                     : SAS 6.0 Gb/s
         Reported Channel,Device(T:L)       : 0,31(31:0)
         Reported Location                  : Enclosure 1, Slot 11
         Reported ESD(T:L)                  : 2,1(1:0)
         Vendor                             : SEAGATE
         Model                              : ST3300657SS
         Firmware                           : 0006
         Serial number                      : 3SJ261K500009107H72P
         World-wide name                    : 5000C50028404668
         Reserved Size                      : 415982 KB
         Used Size                          : 285696 MB
         Unused Size                        : 64 KB
         Total Size                         : 286102 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off
         SSD                                : No
      Device #19
         Device is a Hard drive
         State                              : Online
         Supported                          : Yes
         Transfer Speed                     : SAS 6.0 Gb/s
         Reported Channel,Device(T:L)       : 0,32(32:0)
         Reported Location                  : Enclosure 1, Slot 12
         Reported ESD(T:L)                  : 2,1(1:0)
         Vendor                             : SEAGATE
         Model                              : ST3300657SS
         Firmware                           : 0006
         Serial number                      : 3SJ25888000091089D3W
         World-wide name                    : 5000C500241F6E8C
         Reserved Size                      : 415982 KB
         Used Size                          : 285696 MB
         Unused Size                        : 64 KB
         Total Size                         : 286102 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off
         SSD                                : No
      Device #20
         Device is a Hard drive
         State                              : Online
         Supported                          : Yes
         Transfer Speed                     : SAS 6.0 Gb/s
         Reported Channel,Device(T:L)       : 0,33(33:0)
         Reported Location                  : Enclosure 1, Slot 13
         Reported ESD(T:L)                  : 2,1(1:0)
         Vendor                             : SEAGATE
         Model                              : ST3300657SS
         Firmware                           : 0006
         Serial number                      : 3SJ244YZ00009107YVX3
         World-wide name                    : 5000C500241F3948
         Reserved Size                      : 415982 KB
         Used Size                          : 285696 MB
         Unused Size                        : 64 KB
         Total Size                         : 286102 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off
         SSD                                : No
      Device #21
         Device is a Hard drive
         State                              : Online
         Supported                          : Yes
         Transfer Speed                     : SAS 6.0 Gb/s
         Reported Channel,Device(T:L)       : 0,34(34:0)
         Reported Location                  : Enclosure 1, Slot 14
         Reported ESD(T:L)                  : 2,1(1:0)
         Vendor                             : SEAGATE
         Model                              : ST3300657SS
         Firmware                           : 0006
         Serial number                      : 3SJ256L600009107Y5XD
         World-wide name                    : 5000C50028401FF0
         Reserved Size                      : 415982 KB
         Used Size                          : 285696 MB
         Unused Size                        : 64 KB
         Total Size                         : 286102 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off
         SSD                                : No
      Device #22
         Device is a Hard drive
         State                              : Online
         Supported                          : Yes
         Transfer Speed                     : SAS 6.0 Gb/s
         Reported Channel,Device(T:L)       : 0,35(35:0)
         Reported Location                  : Enclosure 1, Slot 15
         Reported ESD(T:L)                  : 2,1(1:0)
         Vendor                             : SEAGATE
         Model                              : ST3300657SS
         Firmware                           : 0006
         Serial number                      : 3SJ25G4N000091089DCA
         World-wide name                    : 5000C500241F7368
         Reserved Size                      : 415982 KB
         Used Size                          : 285696 MB
         Unused Size                        : 64 KB
         Total Size                         : 286102 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off
         SSD                                : No
      Device #23
         Device is a Hard drive
         State                              : Global Hot-Spare
         Supported                          : Yes
         Transfer Speed                     : SAS 6.0 Gb/s
         Reported Channel,Device(T:L)       : 0,36(36:0)
         Reported Location                  : Enclosure 1, Slot 16
         Reported ESD(T:L)                  : 2,1(1:0)
         Vendor                             : SEAGATE
         Model                              : ST3300657SS
         Firmware                           : 0006
         Serial number                      : 3SJ259VW000091089A3K
         World-wide name                    : 5000C500241F5D30
         Reserved Size                      : 415982 KB
         Used Size                          : 285696 MB
         Unused Size                        : 64 KB
         Total Size                         : 286102 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off
         SSD                                : No
      Device #24
         Device is a Hard drive
         State                              : Online
         Supported                          : Yes
         Transfer Speed                     : SATA 6.0 Gb/s
         Reported Channel,Device(T:L)       : 0,37(37:0)
         Reported Location                  : Enclosure 1, Slot 17
         Reported ESD(T:L)                  : 2,1(1:0)
         Vendor                             : Hitachi
         Model                              : HUA723020ALA640
         Firmware                           : MK7OA5C0
         Serial number                      : MK0A31YHGLUS7A
         Reserved Size                      : 3163160 KB
         Used Size                          : 1904640 MB
         Unused Size                        : 64 KB
         Total Size                         : 1907729 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off,Reduced rpm
         SSD                                : No
         NCQ status                         : Enabled
      Device #25
         Device is a Hard drive
         State                              : Online
         Supported                          : Yes
         Transfer Speed                     : SATA 6.0 Gb/s
         Reported Channel,Device(T:L)       : 0,38(38:0)
         Reported Location                  : Enclosure 1, Slot 18
         Reported ESD(T:L)                  : 2,1(1:0)
         Vendor                             : Hitachi
         Model                              : HUA723020ALA640
         Firmware                           : MK7OA5C0
         Serial number                      : MK0A31YHGLBSTA
         Reserved Size                      : 3163160 KB
         Used Size                          : 1904640 MB
         Unused Size                        : 64 KB
         Total Size                         : 1907729 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off,Reduced rpm
         SSD                                : No
         NCQ status                         : Enabled
      Device #26
         Device is a Hard drive
         State                              : Online
         Supported                          : Yes
         Transfer Speed                     : SATA 6.0 Gb/s
         Reported Channel,Device(T:L)       : 0,39(39:0)
         Reported Location                  : Enclosure 1, Slot 19
         Reported ESD(T:L)                  : 2,1(1:0)
         Vendor                             : Hitachi
         Model                              : HUA723020ALA640
         Firmware                           : MK7OA5C0
         Serial number                      : MK0A31YHGLU1ZA
         Reserved Size                      : 3163160 KB
         Used Size                          : 1904640 MB
         Unused Size                        : 64 KB
         Total Size                         : 1907729 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off,Reduced rpm
         SSD                                : No
         NCQ status                         : Enabled
      Device #27
         Device is a Hard drive
         State                              : Online
         Supported                          : Yes
         Transfer Speed                     : SATA 6.0 Gb/s
         Reported Channel,Device(T:L)       : 0,40(40:0)
         Reported Location                  : Enclosure 1, Slot 20
         Reported ESD(T:L)                  : 2,1(1:0)
         Vendor                             : Hitachi
         Model                              : HUA723020ALA640
         Firmware                           : MK7OA5C0
         Serial number                      : MK0A31YHGLT00A
         Reserved Size                      : 3163160 KB
         Used Size                          : 1904640 MB
         Unused Size                        : 64 KB
         Total Size                         : 1907729 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off,Reduced rpm
         SSD                                : No
         NCQ status                         : Enabled
      Device #28
         Device is a Hard drive
         State                              : Online
         Supported                          : Yes
         Transfer Speed                     : SATA 6.0 Gb/s
         Reported Channel,Device(T:L)       : 0,41(41:0)
         Reported Location                  : Enclosure 1, Slot 21
         Reported ESD(T:L)                  : 2,1(1:0)
         Vendor                             : Hitachi
         Model                              : HUA723020ALA640
         Firmware                           : MK7OA5C0
         Serial number                      : MK0A31YHGM418A
         Reserved Size                      : 3163160 KB
         Used Size                          : 1904640 MB
         Unused Size                        : 64 KB
         Total Size                         : 1907729 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off,Reduced rpm
         SSD                                : No
         NCQ status                         : Enabled
      Device #29
         Device is a Hard drive
         State                              : Online
         Supported                          : Yes
         Transfer Speed                     : SATA 6.0 Gb/s
         Reported Channel,Device(T:L)       : 0,42(42:0)
         Reported Location                  : Enclosure 1, Slot 22
         Reported ESD(T:L)                  : 2,1(1:0)
         Vendor                             : Hitachi
         Model                              : HUA723020ALA640
         Firmware                           : MK7OA5C0
         Serial number                      : MK0A31YHGLT81A
         Reserved Size                      : 3163160 KB
         Used Size                          : 1904640 MB
         Unused Size                        : 64 KB
         Total Size                         : 1907729 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off,Reduced rpm
         SSD                                : No
         NCQ status                         : Enabled
      Device #30
         Device is a Hard drive
         State                              : Global Hot-Spare
         Supported                          : Yes
         Transfer Speed                     : SATA 6.0 Gb/s
         Reported Channel,Device(T:L)       : 0,43(43:0)
         Reported Location                  : Enclosure 1, Slot 23
         Reported ESD(T:L)                  : 2,1(1:0)
         Vendor                             : Hitachi
         Model                              : HUA723020ALA640
         Firmware                           : MK7OA5C0
         Serial number                      : MK0A31YHGLWK8A
         Reserved Size                      : 3163160 KB
         Used Size                          : 1904640 MB
         Unused Size                        : 64 KB
         Total Size                         : 1907729 MB
         Write Cache                        : Enabled (write-back)
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off,Reduced rpm
         SSD                                : No
         NCQ status                         : Enabled
      Device #31
         Device is an Enclosure services device
         Reported Channel,Device(T:L)       : 2,0(0:0)
         Enclosure ID                       : 0
         Type                               : SES2
         Vendor                             : LSI CORP
         Model                              : SAS2X28
         Firmware                           : 0717
         Status of Enclosure services device
            Fan 1 status                    : 0 rpm (Not Installed)
            Fan 2 status                    : 0 rpm (Not Installed)
            Fan 3 status                    : 0 rpm (Not Installed)
            Power supply 1 status           : Not Installed
            Power supply 2 status           : Not Installed
            Temperature Sensor Status 1     : 27 C/ 80 F (Normal)
            Speaker status                  : Off
      Device #32
         Device is an Enclosure services device
         Reported Channel,Device(T:L)       : 2,1(1:0)
         Enclosure ID                       : 1
         Type                               : SES2
         Vendor                             : LSI CORP
         Model                              : SAS2X36
         Firmware                           : 0717
         Status of Enclosure services device
            Fan 1 status                    : 6540 rpm (Optimal)
            Fan 2 status                    : 6840 rpm (Optimal)
            Fan 3 status                    : 6960 rpm (Optimal)
            Fan 4 status                    : 0 rpm (Unknown)
            Fan 5 status                    : 0 rpm (Unknown)
            Power supply 1 status           : Not Installed
            Power supply 2 status           : Not Installed
            Temperature Sensor Status 1     : 27 C/ 80 F (Normal)
            Speaker status                  : Off

mdstat plugin returns incorrect state for recovery/reshape

When reshaping or recovering disks, the mdstat plugin returns OK for both states

recovery:

# cat /proc/mdstat
Personalities : [raid6] [raid5] [raid4]
md0 : active raid6 sde1[6] sdf1[7] sdb1[0] sdg1[3] sdd1[2] sdc[1]
  5860543744 blocks level 6, 4k chunk, algorithm 2 [6/4] [UUUU__]
  [===>.................]  recovery = 19.6% (288381540/1465135936) finish=1420.1min speed=13810K/sec

unused devices: <none>

# ./check_raid.pl -p mdstat
OK: mdstat:[md0(5.46 TiB raid6):UUUU__ (recovery:19.8% 13972K/sec ETA: 1400.9min)]

reshape:

# cat /proc/mdstat
Personalities : [raid6] [raid5] [raid4]
md0 : active raid6 sde1[6](S) sdf1[7](S) sdb1[0] sdg1[3] sdd1[2] sdc[1]
  5860543744 blocks super 0.91 level 6, 4k chunk, algorithm 18 [6/4] [UUUU__]
  [=========>...........]  reshape = 48.4% (709745748/1465135936) finish=1271.8min speed=9898K/sec

unused devices: <none>

# ./check_raid.pl -p mdstat
OK: mdstat:[md0(5.46 TiB raid6):UUUU__ (reshape:8.4% 9492K/sec ETA: 2355.1min)]

mdstat returning "Unexpected parse"

check_raid.pl version 3.0.6

/proc/mdstat file:

Personalities : [raid1] 
md2 : active (auto-read-only) raid1 sdc3[0] sdd3[1]
      1757700984 blocks super 1.2 [2/2] [UU]

md1 : active raid1 sdc2[0] sdd2[1]
      195311544 blocks super 1.2 [2/2] [UU]

md0 : active (auto-read-only) raid1 sdc1[0] sdd1[1]
      498676 blocks super 1.2 [2/2] [UU]

unused devices: <none>

Results of check_raid.pl:

Unexpected parse at ./check_raid.pl line 621, <$fh> line 5.

perl -v:

This is perl 5, version 14, subversion 2 (v5.14.2) built for x86_64-linux-gnu-thread-multi

It gets through the personality check (gets raid1 as personality), gets to the following line (621):

die "Unexpected parse" if @parts;

and dies. In perldb, if I do a p on @Parts, it returns empty.

If I change it to

die "Unexpected parse" if (scalar @parts == 0);

it makes it through the first set, then starts in on the second. It gets to the loop where it's checking sdc2 and sdd2:

p @parts
raid1sdc2[0]sdd2[1]

gets through the loops (personality is set, and it goes to "last"), then dies:

Unexpected parse at /usr/lib/nagios/plugins/check_raid.pl line 621, <$fh> line 5.

parsing /proc/mdstat breaks when using Intel raid (imsm metadata)

mdadm is capable of managing Intel fakeraid which results in /proc/mdstat output similar to the following:

# cat /proc/mdstat
Personalities : [raid1]
md127 : active raid1 sda[1] sdb[0]
      976759808 blocks super external:/md0/0 [2/2] [UU]

md0 : inactive sda[1](S) sdb[0](S)
      5288 blocks super external:imsm

unused devices: <none>

This breaks the plugin:

# ./check_raid.pl
Use of uninitialized value $md{"status"} in pattern match (m//) at ./check_raid.pl line 635.
Use of uninitialized value $md{"status"} in string at ./check_raid.pl line 645.
OK: mdstat:[md127(931.51 GiB raid1):UU, md0(5.16 MiB sda[1](S)):]

md0 is a container, the actual RAID array created inside md0 is md127.
Right now the parsing code does not handle this case which results in the above mis-parsing, warnings and wrong plugin output.

Properly handling this case means that we should either issue a WARNING if an imsm/dff container exists that is not referenced in another array or completely ignore those containers no matter if an actual array exists inside or not, whichever seems more desirable.
Judging from the man page I assume it also breaks on dff metadata containers and that the output is similar, but I have not actually verified this.

It would also be useful to add the array type to the plugin output to indicate that an array is not actually a Linux softraid in this case.

not works when multiple raid tools installed

I need to check raid using mpt-status but in system is installed
/sbin/mpt-status
/sbin/MegaCli

The plugin try to check the array using MegaCli and theris no way to force use of mpt-status

areca controller: "Checking" state leads to critical

Hi.

Maybe this is a new state, but my RAIDs show:

# /opt/areca/cli64 rsf info
 #  Name             Disks TotalCap  FreeCap DiskChannels       State          
===============================================================================
 1  Raid Set # 00       15 11250.0GB    0.0GB 123456789ABCDEF    Checking
===============================================================================
GuiErrMsg<0x00>: Success.

which leads to a CRITICAL state.

I guess (though I'm not sure - Areca doesn't document the states in the PDF manual) that checking is just some usual RAID consistency check? In that case this should probably give an OK.

Cheers,
Chris.

Please add warning when mdraid is resynchronizing

check_raid.pl does not inform, when mdraid is resynchronizing the disks, it only changes the return state when a raid fails/a disk has been removed from the raid array.
It would be very helpful if a warning exit would occur, when mdraid is doing a resync.

# ./check_raid.pl 
OK: mdstat:[md2(2.73 TiB raid1):UU, md1(511.99 MiB raid1):UU, md0(2.00 GiB raid1):UU]

# cat /proc/mdstat 
Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] 
md2 : active raid1 sda3[2] sdb3[1]
      2927641919 blocks super 1.2 [2/2] [UU]
      [===================>.]  check = 95.7% (2804213632/2927641919) finish=265.6min speed=7744K/sec

md1 : active raid1 sda2[2] sdb2[1]
      524276 blocks super 1.2 [2/2] [UU]

md0 : active raid1 sda1[2] sdb1[1]
      2096116 blocks super 1.2 [2/2] [UU]

unused devices: <none>

Status during rebuild

Hi,

I think the Status should be "Warning" when the Logical Device 0(data) is Degraded but the hard drive status is "rebuilding".

CRITICAL: arcconf:[Controller:Optimal, Logical device #0: Rebuild: In Progress 36%, ZMM Status: ZMM not installed, Logical Device 0(data):Degraded, Drives: WD-WCAW36362892,WD-WCAW36407613,WD-WCAW36385723=Online WD-WCAW36405341=Rebuilding]

Please consider the following scenario:

  1. Hard drive fails, logical device is degraded, status becomes Critical and an alert is being sent to the administrator.
  2. Once the failed hard drive is replaced and the array is being rebuilt, the status changes to warning since we're still in degraded mode.
  3. Now, once the rebuild process is successful, the status returns to being ok. If on the other hand the rebuild process fails, the state becomes critical again and a new alert is sent to the administrator.

In this fashion, the raid array can be constantly monitored at a glance without getting unwanted alerts but still being alarmed if/when another failure occurs.

Cheers!

Areca cli64 check doesn't handle Raid Sets with custom names

I've looked through the code, and it seems that if you name your RAID set anything but the default "Raid Set # NNN" where NNN is a number, 000 to 999, the check reports a critical error.

This seems to be because of line 1343.

I'm running the default check_raid plugin from Debian 7.3 (wheezy). The plugin is version 2.1.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.