Hi again,
I am actually running into this issue myself now where I'd like to be able to use a null character in the send and/or receive string for a TCP monitor. Do you mind sharing your case number so I can pass it along to F5 Support as a reference for my case? Mine is C569837.
You might want to add the PID checking to ensure only one instance of the monitor per pool member is running at a time. It's more of a best practice than a functional requirement though.
Formulate the PID filename based on the script name, pool member IP and port
PIDFILE="/var/run/`basename ${0}`.${NODE}_${PORT}.pid"
If the PID file already exists, it means the last instance of this monitor
is probably hung.
if [ -f $PIDFILE ]
then
Stop the current process
kill -9 `cat $PIDFILE` > /dev/null 2>&1
fi
Create a new PID file
echo "$$" > $PIDFILE
And then at the end of the script:
Remove the PID file
rm -f $PIDFILE
Thanks,
Aaron