Forum Discussion
rraver_79489
Nimbostratus
May 08, 2009External health monitor works when ran from CLI but doesn't when applied to profile
I have the below health monitor that works when I run it in the command line, an UP statement gets put to the screen but doesn't when I apply it to the profile. I have tried it with both the static IP and the variable IP.
IP=`echo ${1} | sed 's/::ffff://'`
IP="10.2.3.10"
PORT=${2}
URI="/acct/ping.jsp"
send request & look for expected respons
STATUS=$(curl -kINfs https://${IP}:${PORT}$URI | grep -i "200 OK")
STATUS=$(curl -kINfs https://10.2.3.12:443/acct/ping.jsp | grep -i "200 OK")
mark node up if response is HTTP STATUS 200
if [ "$STATUS"=="HTTP/1.1 200 OK" ]
then
echo "UP"
fi
any ideas or suggestions? It's to check the page HTTP status code and verify that it's code 200.
- The_Bhattman
Nimbostratus
Why didn't you choose to use the built-in http monitor. If you are looking for a status code then it can be easily obtained with that. - Yossi_Attia_100
Nimbostratus
Hey, - Tompa_93231
Nimbostratus
Try using lower case letters. - hoolio
Cirrostratus
Any standard output from an external script will be interpreted as a positive response for the member state, so the case (or the content) of the "up" message shouldn't matter.
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