Forum Discussion
Greg__33907
Nimbostratus
Oct 15, 2008HTTPS monitor on a specific port
Hey guys,
I've had a read through the forums but havent found anything that can help.
I am using an LTM running v4.6.4
I am trying to monitor a node using ...
Alok_3817
Nimbostratus
Nov 10, 2008Well, if that doesnt work, there one thing you can try, creating a custom monitor using "cURL" it some times so happens that the cert negotiation of the openssl installed doesnt work well. In that case, when we set a send string and the string is encrypted, the server is not able to undertand it and vice versa this can be a problem on the server side as well...
I have tried this on a 9.X not sure if you have the option to create one on the 4.5 version but you can write a shell script and call it from you monitor
Before trying this out, you can manually try out if this will work, from the CLI of the bigip execute
Say your send string is /test.html
And your recieve string is "I am Up"
The member IP is 1.1.1.10 and port is 4433
execute this
curl -k https://1.1.1.10:4433/test.html
The "-k" specifies anyauth mechanism (Real Curl man page for details)
Hit Enter, If you get " I am up' then you should think of going for this solution
You can go to /usr/bin/monitors
Use VI editor and name it some thing may be "https-curl"
!/bin/sh
TMPFILE="/var/run/`basename ${0}`.${NODE}_${PORT}.pid"
kill of the last instance of this monitor if hung and log current pid
if [ -f $TMPFILE ]
then
kill -9 `cat $TMPFILE` > /dev/null 2>&1
fi
echo "$$" > $TMPFILE
NODE=`echo ${1} | sed 's/::ffff://'`
PORT=${2}
send request & check for expected response
curl -k http://${NODE}:${PORT}${URI} | grep -i "${RECV}" 2>&1 > /dev/null
mark node UP if expected response was received
if [ $? -eq 0 ]
then
echo "UP"
fi
rm -f $PIDFILE
exit
You can modify the Curl to suit your needs...
make this executable for every one using chmod 777 /usr/bin/monitors/https-curl
Once you have the script in place you can now call it for your custom monitor
monitor mycustommonitor {
run "https-curl"
URI "/test.html"
RECV "I am UP"
}
Associate this with your pool which you are having the problem, you can test the work of the monitor by exporting the variables and then using sh -xv to execute this
Hope this helps
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