Red Hat ENTERPRISE LINUX 5 - VIRTUAL SERVER ADMINISTRATION Manual page 55

Hide thumbs Also See for ENTERPRISE LINUX 5 - VIRTUAL SERVER ADMINISTRATION:
Table of Contents

Advertisement

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. This 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.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 nanny daemon to send to each real server in this field. By default the send
field is completed for HTTP. You can alter this value depending on your needs. If you leave this
field blank, the nanny daemon attempts to open the port and assume the service is running if it
succeeds.
Only one send sequence is allowed in this field, and it can only contain printable, ASCII characters
as well as the following escape characters:
• \n for new line.
• \r for carriage return.
• \t for tab.
• \ to escape the next character which follows it.
Expect
Enter a the textual response the server should return if it is functioning properly. If you wrote your
own sending program, enter the response you told it to send if it was successful.
EDIT MONITORING SCRIPTS Subsection
45

Advertisement

Table of Contents
loading

Table of Contents