Check CEC
Check CEC
A plugin designed to monitor Coraid shelves and LUN status.
Download check_cec
NAME
check_cec.pl
SYNOPSIS
check_cec.pl [OPTIONS] --HOST shelfnum --type command
check_cec --HOST shelf1 --type ping
check_cec --warning 2 --critical 1 --HOST shelf1 --type lun
DESCRIPTION
Check_cec is a Nagios plugin designed to monitor Coraid SR and SRX shelves via
the Coraid Ethernet Console (cec) command-line. It will report any LUNs that
are exhibiting disk failure, as well as simple shelf up/down status. As a
Nagios plugin, its return value and output are consistent with Nagios
expectations.
Check_cec requires the Expect perl module. It can deal with password-protected
shelves by setting the $pass variable at the top of the script.
OPTIONS
- -c, --critical=x
-
Set the critical level for the number of expected LUNs (only applies to the
'lun' check type). If there are fewer than this number of LUNs discovered on
the shelf, the plugin returns 2 (Nagios CRITICAL). Also note that any LUN
status other than 'normal' returns critical. (default: -1)
- -h, --help
-
Print brief usage message.
- -H, --HOST=shelfx
-
Shelf name either ending or consisting entirely of digits, ex: shelf1.
- -t, --type=type
-
Specify the type of check to conduct. Valid values are 'ping' (shelf up/down
check) and 'lun' (lun status check). The ping check simply connects to the
shelf, while the lun check executes several commands to determine number and
status of luns subject to the warning and critical arguments if specified.
Any LUN status other than 'normal' returns critical. (default: ping)
- -w, --warning=x
-
Set the warning level for the number of expected LUNs (only applies to the
'lun' check type). If there are fewer than this number of LUNs discovered on
the shelf, the plugin returns 1 (Nagios WARNING). (default: -1)
CONFIGURATION
Configuration in Nagios is as straightforward as most checks. However, one
consideration to keep in mind is that cec must be run as root. A simple way to
accomplish this is with a Nagios command definition using sudo:
define command {
command_name check_cec_lun
command_line /usr/bin/sudo $USER1$/check_cec.pl -H $HOSTNAME$ --type=lun
}
And a sudoers entry like so:
nagios ALL=(ALL) NOPASSWD: /usr/local/nagios/libexec/check_cec.pl
CHANGES
check_cec 1.00 (20120626)
- Initial release.
|