Forum Discussion
pgroven_71837
Nimbostratus
Jan 09, 2008HTTPMonitor_cURL_ProbeTimeout
I am not sure how to implement the sample monitor posted on DevCentral
I cannot use the http monitor as the string I need to recieve is longer than 5120 bytes
The following script should wor...
Deb_Allen_18
Jan 23, 2008Historic F5 Account
hmmmm....
I've tested the script & monitor definition, and it works as expected on my 9.4.3 and 9.1.2 systems. If you are not seeing traffic in a trace from the monitor, but you are when you run it at the command line, there's something wrong with your monitor definition that is preventing the script from sending the request.
Here is the body of the script I tested:
IP=`echo ${1} | sed 's/::ffff://'`
PORT=${2}
PIDFILE="/var/run/`basename ${0}`.${IP}_${PORT}.pid"
if [ -f $PIDFILE ]
then
kill -9 `cat $PIDFILE` > /dev/null 2>&1
fi
echo "$$" > $PIDFILE
curl -fNs -m ${P_TIMEOUT} http://${IP}:${CAUCHOPORT}${URI} | grep -i "${RECV}" 2>&1 > /dev/null
if [ $? -eq 0 ]
then
echo "UP"
else
/bin/bigpipe pool ${POOL} member ${IP}:${PORT} down 2>&1 > /dev/null
fi
rm -f $PIDFILE
exitand my monitor definition (slightly different from yours to accommodate my server setup):
monitor caucho {
defaults from external
run "caucho"
CAUCHOPORT "8080"
POOL "myPool"
P_TIMEOUT "5"
RECV "Looks Good To Me"
URI "/test.html"
}/deb
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
