diff options
author | Peter Palfrader <peter@palfrader.org> | 2014-09-03 11:37:35 +0200 |
---|---|---|
committer | Peter Palfrader <peter@palfrader.org> | 2014-09-03 11:37:35 +0200 |
commit | 8e233f74d3e218de01003a88a4e34d681001f712 (patch) | |
tree | 954ee162cfe99eadfeee565dbe6a00abf034857c /nagios-checks/nagios-check-raid-gdth | |
parent | 82f0e5970523d4d35e0d4b5bcc016d835d8a6ef1 (diff) |
Move files around
Diffstat (limited to 'nagios-checks/nagios-check-raid-gdth')
-rwxr-xr-x | nagios-checks/nagios-check-raid-gdth | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/nagios-checks/nagios-check-raid-gdth b/nagios-checks/nagios-check-raid-gdth new file mode 100755 index 0000000..a57639d --- /dev/null +++ b/nagios-checks/nagios-check-raid-gdth @@ -0,0 +1,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 |