summaryrefslogtreecommitdiff
path: root/nagios-check-raid-gdth
blob: a57639dacad2c243032c213ecfb025e9d03a01b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh

# really quick and dirty

# my %ERRORS = ( OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => -1 );

if ! [ -e "/root/gdth-status-all-ok" ] ; then
	echo "/root/gdth-status-all-ok not found." >&2
	exit -1
fi
if ! [ -e "/proc/scsi/gdth/0" ] ; then
	echo "/proc/scsi/gdth/0 not found." >&2
	exit -1
fi
if diff /root/gdth-status-all-ok /proc/scsi/gdth/0 > /dev/null; then
	echo "Raid status matches known-good copy."
	exit 0
else
	echo "Raid status does NOT match known-good copy.  RAID FAILED?"
	exit 2
fi