Hi Aaron
I added this line to the script:
Send the request request and check the response
nc $IP $PORT | grep "my receive string" 2>&1 > /dev/null
curl -fNs -H "Content-Type: application/soap+xml;charset=UTF-8" http://${IP}:${PORT}/${URI} -d @${DATA} | grep ${RECV} 2>&1 > /dev/null
It didn't even look like it was getting through to "echo UP" although $? returned as 0 before entering the if statement. Might have been an issue with the curl, but I couldn't spot it, and worked fine with debug=1.
if [ $? -eq 0 ]
then
rm -f $pidfile
if [ $DEBUG -eq 1 ]; then echo "EAV `basename $0`: Succeeded for ${IP}:${PORT}" | logger -p local0.debug; fi
echo UP
monitor curl_external {
defaults from external
DATA "/usr/bin/monitors/request.xml"
DEBUG "0"
RECV "string here"
run "curl_monitor.sh"
URI "query URI"
}
If you wonder why I didn't use the SOAP monitor instead of a curl, it's because it didn't seem to support the correct soap envelope I was after (
http://www.w3.org/2003/05/soap-envelope instead of
http://schemas.xmlsoap.org/soap/envelope/)
Running BIG-IP 9.4.7 Build 320.1 Final
Will