summaryrefslogtreecommitdiff
path: root/nagios-check-raid-gdth
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2006-02-14 17:05:38 +0000
committerweasel <weasel@bc3d92e2-beff-0310-a7cd-cc87d7ac0ede>2006-02-14 17:05:38 +0000
commit50a31f681b5efebb78a775767620ce2ca6a06c16 (patch)
tree266528eb720677e143bee9dae348f0516e4152ea /nagios-check-raid-gdth
parent8bea7e93c32531c9e0c00e87da45dbdad2d51ca2 (diff)
Add qnd nagios-check-raid-gdth
git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@56 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede
Diffstat (limited to 'nagios-check-raid-gdth')
-rwxr-xr-xnagios-check-raid-gdth21
1 files changed, 21 insertions, 0 deletions
diff --git a/nagios-check-raid-gdth b/nagios-check-raid-gdth
new file mode 100755
index 0000000..a57639d
--- /dev/null
+++ b/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