Forum Discussion
hooleylist
Oct 12, 2012Cirrostratus
Hi Stefan,
There's a "bug" of sorts with many example external monitors. When the script sends anything to STDOUT, bigd marks the monitor as successful and stops its execution. So make sure that the removal of the PIDFILE is done before anything is echoed to STDOUT.
Here's one method that avoid this situation:
echo "GET /" | /usr/bin/nc $node_ip $2 2> /dev/null | grep -E -i $3 > /dev/null
status=$?
if [ $status -eq 0 ]
then
rm -f $pidfile ; remove the pidfile before the script echoes anything to stdout and is killed by bigd
echo "up"
fi
rm -f $pidfile ; also remove the pidfile before the script ends if $status isn’t 0
This is described in SOL7444:
sol7444: Requirements for external monitor output
https://support.f5.com/kb/en-us/solutions/public/7000/400/sol7444.html
Can you reply with any links where this isn't being done correctly so I can update/request to have them updated? I've done this already for the sample external monitors that are shipped with LTM.
Thanks, Aaron