From: Dennis Schafroth Date: Fri, 11 Mar 2011 12:26:47 +0000 (+0100) Subject: New files for nagios check X-Git-Tag: v1.5.6~43 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=514b9e2d514b754ab2f4ef9158c6bed4471f9dde;p=pazpar2-moved-to-github.git New files for nagios check --- 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 +