3 # Modified check_sensors to check the alarm status of an Adaptec 3200S RAID
6 # Scott Lambert -- lambert@lambertfam.org
8 # Tested on FreeBSD 4.7 with the adptfbsd_323.tgz package installed. This
9 # package installs all it's programs into /usr/dpt.
12 PATH
=/bin
:/sbin
:/usr
/bin
:/usr
/sbin
:/usr
/local
/bin
:/usr
/local
/sbin
14 PROGNAME
=`basename $0`
15 PROGPATH
=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'`
16 REVISION
=`echo '$Revision: 302 $' | sed -e 's/[^0-9.]//g'`
20 RAIDUTIL_CMD
="/usr/dpt/raidutil -A ?"
23 echo "Usage: $PROGNAME"
27 print_revision
$PROGNAME $REVISION
31 echo "This plugin checks alarm status of Adaptec 3200S RAID controller."
47 print_revision
$PROGNAME $REVISION
51 print_revision
$PROGNAME $REVISION
55 raidutiloutput
=`$RAIDUTIL_CMD 2>&1`
57 if test "$1" = "-v" -o "$1" = "--verbose"; then
58 echo ${raidutiloutput}
60 if test ${status} -eq 127; then
61 echo "RAIDUTIL UNKNOWN - command not found (did you install raidutil?)"
63 elif test ${status} -ne 0 ; then
64 echo "WARNING - raidutil returned state $status"
67 if echo ${raidutiloutput} |
egrep On
> /dev
/null
; then
68 echo RAID CRITICAL
- RAID alarm detected
!