initial commit

This commit is contained in:
Moritz Rudert (helios)
2012-02-12 10:23:57 +01:00
commit 68840f51ec
13 changed files with 1055 additions and 0 deletions

18
check_mysql_cluster Executable file
View File

@@ -0,0 +1,18 @@
#!/bin/bash
. /usr/lib/nagios/plugins/utils.sh
killall -9 ndb_mgm >/dev/null 2>/dev/null
tmpfile=`mktemp`
ndb_mgm -e show --try-reconnect=1 > $tmpfile 2>/dev/null
if grep -q "Unable to connect " $tmpfile; then
echo "[CRITICAL] unable to connect to mgmt"
exit $STATE_CRITICAL
elif grep -q connected $tmpfile; then
echo "[CRITICAL] not connected: `grep connected $tmpfile | awk '{ printf "%s (%s ", $1, $7 }'`"
exit $STATE_CRITICAL
else
echo "[OK]"
exit $STATE_OK
fi