From 514b9e2d514b754ab2f4ef9158c6bed4471f9dde Mon Sep 17 00:00:00 2001 From: Dennis Schafroth Date: Fri, 11 Mar 2011 13:26:47 +0100 Subject: [PATCH] New files for nagios check --- etc/check-pazpar2.sh | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100755 etc/check-pazpar2.sh diff --git a/etc/check-pazpar2.sh b/etc/check-pazpar2.sh new file mode 100755 index 0000000..c5d97d6 --- /dev/null +++ b/etc/check-pazpar2.sh @@ -0,0 +1,68 @@ +#!/bin/sh + +usage() +{ +cat < /dev/null` + +if [ $? -ne 0 ] ; then + MSG="FATAL failed to communicate with pazpar2" + exit 128 +fi + +if [ "$WARN_LEVEL" != "" ] ; then + if [ $SESSIONS -gt $WARN_LEVEL ]; then + MSG="WARNING " + rc=1; + fi +fi + +if [ "$CRIT_LEVEL" != "" ] ; then + if [ $SESSIONS -gt $CRIT_LEVEL ]; then + MSG="CRITICAL " + rc=2; + fi +fi + +echo "SESSIONS $MSG $SESSIONS ($CLIENTS) | $SESSIONS;$WARN_LEVEL;$CRIT_LEVEL " +exit $rc + -- 1.7.10.4