Forum Discussion
Christopher_Boo
Mar 21, 2011Cirrostratus
Dig around and you will find an example/thread of and external health monitor script that allows for logging in (plus some good info). I can't find the original, but here is a copy of the script I use to monitor sharepoint. The script type would be "external program".
!/bin/sh remove IPv6/IPv4 compatibility prefix (LTM passes addresses in IPv6 format) IP=`echo ${1} | sed 's/::ffff://'` IP=${1} PORT=${2} PIDFILE="/var/run/`basename ${0}`.${IP}_${PORT}.pid" kill of the last instance of this monitor if hung and log current pid if [ -f $PIDFILE ] then kill -9 `cat $PIDFILE` > /dev/null 2>&1 fi echo "$$" > $PIDFILE send request & check for expected response /usr/bin/curl -L --ntlm -k -v --user 'user:password' http://ipaddress/pages/default.aspx -H "Host:99.99.99.99" | grep -i " World Medical" 2>&1 > /dev/null mark node UP if expected response was received if [ $? -eq 0 ] then echo "UP" fi rm -f $PIDFILE exit