Red Hat LINUX VIRTUAL SERVER - FOR ENTERPRISE LINUX 5.2 REV 05-2008 Manual page 62

Linux virtual server (lvs) for red hat enterprise linux 5.2
Table of Contents

Advertisement

Chapter 4. Configuring the LVS Routers with Piranha Configuration Tool
Figure 4.9. The EDIT MONITORING SCRIPTS Subsection
Sending Program
For more advanced service verification, you can use this field to specify the path to a
service-checking script. This functionality is especially helpful for services that require
dynamically changing data, such as HTTPS 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.
Tip
To ensure that each server in the real server pool is checked, use the special
token
%h
replaced with each real server's IP address as the script is called by the
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.example.com
if [ $TEST != "1" ]; then
echo "OK
else
echo "FAIL"
fi
Note
If an external program is entered in the Sending Program field, then the Send
field is ignored.
Send
Enter a string for the
send field is completed for HTTP. You can alter this value depending on your needs. If you
leave this field blank, the
is running if it succeeds.
52
after the path to the script in the Sending Program field. This token is
daemon to send to each real server in this field. By default the
nanny
daemon attempts to open the port and assume the service
nanny
nanny

Advertisement

Table of Contents
loading

This manual is also suitable for:

Linux virtual server

Table of Contents