Installation guide

Figure 4 .9. T he EDIT MONIT ORING SCRIPTS Subsection
Sending Program
For more advanced service verification, you can use this field to specify the path to a service-
checking script. T his functionality is especially helpful for services that require dynamically
changing data, such as HT TPS or SSL.
To use this functionality, you must write a script that returns a textual response, set it to be
executable, and type the path to it in the Sending Program field.
Note
To ensure that each server in the real server pool is checked, use the special token %h
after the path to the script in the Sending Program field. T his token is replaced with
each real server's IP address as the script is called by the nanny daemon.
The following is a sample script to use as a guide when composing an external service-
checking script:
#!/bin/sh
TEST=`dig -t soa example.com @$1 | grep -c dns.exam ple.com
if [ $TEST != "1" ]; then
echo "OK
else
echo "FAIL"
fi
Chapter 4. Configuring the LVS Routers with Piranha Configuration Tool
4 7