Forum Discussion
Will_97818
Nimbostratus
Aug 16, 2013Using variable to set http file we test in a probe
We are using an http get of a file to validate the listener is up. We are using the port number as the file we are getting. an example today we have the following.
send "GET /8080.active HTTP/1....
hoolio
Cirrostratus
Aug 16, 2013Just make sure to remove the pidfile before echoing anything to STDOUT as bigd kills the process immediately after the echo.
!/bin/sh
these arguments supplied automatically for all external pingers:
$1 = IP (::ffff:nnn.nnn.nnn.nnn notation or hostname)
$2 = port (decimal, host byte order)
$3 and higher = additional arguments
pidfile="/var/run/$MONITOR_NAME.$1..$2.pid"
if [ -f $pidfile ]
then
kill -9 -`cat $pidfile` > /dev/null 2>&1
fi
echo "$$" > $pidfile
node_ip=`echo $1 | sed 's/::ffff://'`
curl -fNs http://$node_ip:$2 |grep $3 1> /dev/null
status=$?
if [ $status -eq 0 ]
then
rm -f $pidfile
echo "up"
else
rm -f $pidfile
fi
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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