NAME

Monitoring::Sneck::Checks::cciss - checks HP Smart Array controllers, through cciss_vol_status

VERSION

Version 0.1.0

SYNOPSIS

cciss|perl:cciss
cciss_sg0|perl:cciss -d /dev/sg0
cciss_bsd|perl:cciss -d /dev/ciss0
cciss_no_battery|perl:cciss -C -o

DESCRIPTION

Checks the logical volumes, physical drives, enclosures, and cache of HP Smart Array controllers, through cciss_vol_status -u -s -V.

- CRITICAL :: A volume FAILED, using interim recovery mode (degraded), with the wrong drive replaced, with a drive not properly connected, overheating, or in a state it does not know. A failed drive, even when a spare has taken over and the volume is OK. A failed spare. A enclosure with a fan, power supply, temperature, or door alert.

- WARNING :: A volume ready for recovery, recovering, expanding, queued for expansion, not yet available, or that was overheated in the past. A spare rebuilding. A drive in S.M.A.R.T. predictive failure. Cache trouble, such as the write cache disabled or a battery problem, unless --ignore-cache is given.

- UNKNOWN :: cciss_vol_status not being there, or saying nothing about a controller.

- OK :: Everything else, including not being a HP, having no controllers, and a controller with no logical drives, such as one used only as a HBA, so the same check can go everywhere.

Without --device, the controllers are found...

- Linux :: If /sys/devices/virtual/dmi/id/sys_vendor says it is a HP, the sg devices of SCSI type 12, RAID controllers, under /sys/class/scsi_generic, for the hpsa driver, and /dev/cciss/c*d0 for the old cciss driver.

- FreeBSD :: /dev/ciss*, as only Smart Arrays have those.

This needs root, to open the devices.

OPTIONS

- -d, --device :: A controller to check, such as /dev/sg0, /dev/cciss/c0d0, or /dev/ciss0, instead of finding them, and without looking at the vendor. May be given more than once.

- -C, --ignore-cache :: Cache trouble is still said, but is OK.

- -o, --output :: After the status line, include the output of cciss_vol_status for each controller.

- -O, --always-output :: As --output, but for every controller.

METHODS

check

Does the check.

controllers

Returns the controllers found, as in the description, such as /dev/sg0 or /dev/ciss0.

controller_status

Runs cciss_vol_status -u -s -V on a controller and returns the code, what to say about it, and what cciss_vol_status printed.

my ( $code, $says, $output ) = $check->controller_status( '/usr/bin/cciss_vol_status', '/dev/sg0' );