So, you want to monitor the RAID on your
FreeBSD servers? Install Nagios and use this plugin to track their status.
License
CheckVinum is licensed under the terms of the GPL.
Put
check_vinum and
check_vinum_wrapper somewhere reasonable, such as
/usr/local/libexec/nagios.
I strongly suggest configuring
SuDo? so that the user
nagios can execute the
check_vinum_wrapper command as
root. This way, the Nagios process can get a status report from Vinum, but it has no ability to send any other (potentially destructive) commands. In fact, you'll have to modify
check_vinum yourself if you do
not want to use
SuDo? for some
reason.
Configuring SuDo?
I have these entries in my
sudoers file:
Cmnd_Alias NAGIOS_PLUGINS = /usr/local/libexec/nagios/check_vinum_wrapper
nagios ALL = (root) NOPASSWD: NAGIOS_PLUGINS
Do this on every machine that will be running
CheckVinum.
Call
check_vinum like any other plugin, but leave off the
$HOSTADDRESS$ argument.
Create a new check command that calls
check_vinum without any arguments. Example:
# 'check_vinum' command definition
define command{
command_name check_vinum
command_line $USER1$/check_vinum
}
Create a new check command that uses the
check_by_ssh command to execute
check_vinum on the remote machine. Example:
# 'check_by_ssh' command definition
define command{
command_name check_vinum_remote
command_line $USER1$/check_by_ssh -H $HOSTADDRESS$ -C /usr/local/libexec/nagios/check_vinum
}
Note that you have to create a passwordless SSH key to connect to an account on the remote machine. Follow the standard
security practices when you set up that account.
Message codes
The plugin returns a lot of information on one line. The status codes are:
| Abbr | Status name |
| Non-error codes |
| dwn | down |
| up | up |
| Warning codes |
| crs | crashed |
| flt | empty |
| ini | flaky |
| obs | initializing |
| obs | obsolete |
| reb | reborn |
| ref | referenced |
| rev | reviving |
| stl | stale |
| Critical codes |
| crp | corrupt |
| dgr | degraded |
| flk | faulty |
The object-type codes are:
| D | Disk |
| S | Subdisk |
| P | Plex |
| V | Volume |
All of the warning and critical codes are joined together on one line, such as:
D:ref-2,S:stl-1,crs-2
That message means that there are:
- Two referenced disks
- One stale subdisk
- Two crashed subdisks
Notes
CheckVinum is quite configurable. Feel free to assign your own failure levels to the various result codes that vinum
can return. For example, on my systems a status of "down" is perfectly acceptable, since that means an administrator
has deliberately stopped an object. If this is a problem on your system, edit the
%sttable variable at the top
of the program to suit. If you change
'down' => ['dwn', 0],
to
'down' => ['dwn', 2],
then "down" objects will be reported as critical errors.
- Set ALLOWTOPICCHANGE = KirkStrauser?
--
KirkStrauser - 13 Jun 2003