NAME

Monitoring::Sneck::Checks::swraid - checks software RAID, md on Linux and gmirror and graid on FreeBSD

VERSION

Version 0.0.1

SYNOPSIS

swraid|perl:swraid
swraid_boot|perl:swraid -a md0 -a md1
swraid_gm|perl:swraid -a mirror/gm0

DESCRIPTION

Checks every software RAID array. One that is degraded, has failed devices, or is not running is CRITICAL. One rebuilding or resyncing is WARNING, with how far along it is. A check or scrub running is fine. Arrays given with --array must be there.

On Linux, md arrays are read from /proc/mdstat. On FreeBSD, gmirror status -s and graid status -s are run, those classes not being loaded, or the commands not being there, counting as having no arrays. Other OSes are UNKNOWN.

Having no arrays at all is OK, unless --array says one should be there.

OPTIONS

- -a, --array :: A array that must be there, such as md0, mirror/gm0, or raid/r0. May be given more than once.

METHODS

check

Does the check.

linux_arrays

Returns the md arrays from /proc/mdstat, as hash refs of name, code, and says, what to say about it.

freebsd_arrays

Returns the gmirror and graid arrays, as for "linux_arrays".