1NANNY(8) System Manager's Manual NANNY(8)
2
3
4
6 nanny - tool to monitor status of services in a cluster
7
9 nanny has two forms, depending on whether it is being used to monitor
10 virtual server services running on real servers, or failover services
11 running on a primary or backup cluster node.
12
13 Using nanny to monitor virtual server services:
14
15 nanny [-t|--interval=ARG] [-I|--ipvsadm=ARG]
16 [-M|--method=ARG] [-U|--loadcmd=ARG]
17 [-n|--nodaemon] [-c|--nofork] [--test-start] [--norun]
18 [-p|--port=ARG] [-a|--reentrytime=ARG] [-h|--server=ARG]
19 [-f|--fwmark=ARG] [-r|--rport=ARG]
20 [-v|--verbose] [-V|--virtaddress=ARG] [-w|--weight=ARG]
21 [-S|--scale=ARG] [-s|--send_string=ARG]
22 [-e|--send_program=ARG[-x|--expect_string=ARG]
23 [-q|--quiesce-server] [-u|--UDP] [-T|--suppress] [-?|--help]
24 [--usage] [--version]
25
26 Using nanny to monitor failover services:
27
28 nanny [-t|--interval=ARG] [-U|--loadcmd=ARG]
29 [-n|--nodaemon] [-c|--nofork] [--test-start] [--norun]
30 [-p|--port=ARG] [-h|--server=ARG] [-r|--rport=ARG] [-v|--verbose]
31 [-V|--virtaddress=ARG] [-s|--send_string=ARG]
32 [-x|--expect_string=ARG] [-R|--startup=ARG]
33 [-D|--shutdown=ARG] [-u|--UDP] [-T|--suppress] [-?|--help]
34 [--usage] [--version]
35
36
38 nanny is a daemon used by pulse to monitor the running status of the
39 specified services on clustered servers. This tool has NO error check‐
40 ing and should not be run without the direct supervision of pulse!
41
42
44 -t ARG|--interval= ARG
45 ARG specifies the number of seconds to wait between connection
46 attempts to the server/service.
47
48 -I ARG|--ipvsadm= ARG
49 This s the path to the ipvsadm tool, which is normally
50 /sbin/ipvsadm. This parameter is not used in failover service
51 monitoring.
52
53 -M ARG|--method= ARG
54 This option specifies the routing method for the real server
55 (this parameter is not used in monitoring failover services).
56 Allowable choices are:
57
58 g - Use gatewaying (direct routing).
59
60 m - Use masquerading (network access translation, or NAT).
61
62 t - Use ipip encapsulation (tunneling).
63
64 -U|--loadcmd=ARG
65 Command to get remote load average and/or perform file transfers
66 with (rup, rsh, ssh).
67
68 -n|--nodaemon
69 Normally, nanny runs as a daemon but with this option runs in
70 the foreground. When running in this mode, nanny sends all out‐
71 put to STDOUT instead of to syslog.
72
73 -c|--nofork
74 This mode forces nanny to disassociate from the terminal, but
75 don't fork off into a daemon.
76
77 --test-start
78 Runs nanny in a test mode. Reports, but does not start, other
79 daemon processes.
80
81 --norun
82 Same as "--test-start".
83
84 -p|--port= ARG
85 Port used on the virtual IP address of the service to be moni‐
86 tored (fos), or the port used on the address of the virtual ser‐
87 vice to be monitored (lvsd). If omitted, port 80 (http) is
88 assumed.
89
90 -a|--reentrytime= ARG
91 The number of seconds a failed service must remain alive before
92 allowing the service/node back into the cluster. The main pur‐
93 pose of this time delay is to avoid having a service or node
94 ping-ponging. As a general rule of thumb, if the service is
95 available uninterupted for 60-120 seconds, then it is generally
96 ok to let it back into the cluster. This parameter is ignored
97 for failover services.
98
99 -S|--scale= ARG
100 This is a factor used to adjust the sensitivity of the real
101 server loading algorythm. By increasing this factor, the CPU
102 load on the server must be much higher before the weighting of
103 the server will be affected in the LVS routing table. This
104 parameter is ignored for failover services.
105
106 -h|--server= ARG
107 This is the IP address of the server that is to be monitored.
108 MUST BE SPECIFIED.
109
110 -f|--fwmark= ARG
111 This is the firewalling mark of the virtual service to be moni‐
112 tored (lvsd). If this option is set, the --virtaddress option
113 will be ignored.
114
115 -r|--rport= ARG
116 Port for nanny to monitor on the real server to check for ser‐
117 vice availability. If omitted, port 80 (http) is assumed.
118
119 -V|--virtaddress= ARG
120 This is the virtual IP address of the service to be monitored
121 (fos), or the address of the virtual service to be monitored
122 (lvsd).
123
124 -w|--weight= ARG
125 The relative weighting of the real servers can be adjusted by
126 changing this setting to a higher number. For example, if one
127 server has a weighting of 1 and another one has a weight of 2,
128 the second one will get twice as many requests redirected to it.
129 The user-assigned weight of the server is adjusted dynamically
130 based the cpu load average and by the scale factor. This parame‐
131 ter is ignored for failover services.
132
133 -e|--send_program = FILE
134 This option depreciates the -s option when used. It's fuction is
135 to allow the use of an external program or script in preferance
136 to the static -s argument against each of the real servers
137 defined in the lvs.cf config file. The special token %h is
138 replaced with the IP of each of the defined real servers and can
139 be used more than once though it will carry the same IP of the
140 defined real server that has been selected. The special token
141 %p is replaced with the port of each of the defined real servers
142 and can be used more than once though it too will carry the same
143 port value of the defined real server that has been selected.
144 eg. 'ping -c1 %h'
145
146 -s|--send_str= ARG
147 Optional text string to send to the port in order to test
148 whether the service is functioning. Length is limited to 255
149 printable, quoteable text characters (\n, \r, \t, \\, and \' are
150 also permitted). If the send_str option is omitted altogether,
151 then no attempt to send data will occur EXCEPT if port = 80 and
152 expect_str is also omitted, in which case a web service is
153 assumed and an http test string will be sent and expected (for
154 backwards compatibility with earlier releases of piranha).
155
156 If both --send_str and --expect_str are specified, then the
157 send_str string will be sent first, before the expect_str string
158 is received and tested. If neither are specified (and port is
159 not 80), then the service will only be tested by the success
160 and/or failure of connecting to the port. No other I/O will be
161 performed.
162
163 -x|--expect_str= ARG
164 Optional text response string expected from the port in order to
165 test whether the service is functioning. Length is limited to
166 255 printable, quotable text characters (\n, \r, \t, \\, and \'
167 are also permitted). If expect_str="*", then any characters are
168 accepted (but SOMETHING must be received). This is different
169 than not specifying any expect string, which means do not even
170 attempt the receive operation.
171
172 If this option is omitted then no attempt to receive data will
173 occur EXCEPT if port = 80 and send_str is also omitted, in which
174 case a web service is assumed and an http test string will be
175 sent and expected (for backwards compatibility with earlier
176 releases of piranha).
177
178 If both --send_str and --expect_str are specified, then the
179 send_str string will be sent first, before the expect_str string
180 is received and tested. If neither are specified, the service
181 will only be tested by the success and/or failure of connecting
182 to the port. No other I/O will be performed.
183
184 -T|--suppress
185 Suppress translation of '\' characters in send/expect strings.
186 Try this if your send/expect strings are not being handled prop‐
187 erly. It will prevent the nanny program from performing its own
188 translations.
189
190 -R|--startup=ARG
191 This parameter is mandatory for monitoring failover services,
192 and must be omitted for monitoring real servers. The specified
193 value is the command or script to execute to start the monitored
194 service and a single optional parameter separated by a space.
195 Failover services are started and stopped by nanny as part of
196 the failover process, and nanny determines whether the service
197 it is monitoring is a failover service (instead of a virtual
198 server) by the presence or absence of this parameter.
199
200 The command used should be repeatable; meaning that it should be
201 harmless (other than a possible returned error value) to execute
202 the command multiple times in a row.
203
204 -D|--shutdown=ARG
205 This parameter is mandatory for monitoring failover services,
206 and must be omitted for monitoring real servers. The specified
207 value is the command or script to execute to stop the monitored
208 service and a single optional parameter separated by a space.
209 Failover services are started and stopped by nanny as part of
210 the failover process, and nanny determines whether the service
211 it is monitoring is a failover service (instead of a virtual
212 server) by the presence or absence of this parameter.
213
214 The command used should be repeatable; meaning that it should be
215 harmless (other than a possible returned error value) to execute
216 the command multiple times in a row.
217
218 -q|--quiesce-server
219 Quiesce server when service monitoring timeouts. It is useful
220 when a server is too busy to serve new requests, nanny will qui‐
221 esce this server by setting its weight zero, so that established
222 connections still get served by this server and no new requests
223 will be sent to this server.
224
225 -u|--UDP
226 Use the UDP protocol instead of TCP for monitor communications.
227
228 -v|--verbose
229 Give *lots* of debugging information to either syslog or STDOUT.
230
231 -?|--help
232 Shows a verbose usage listing.
233
234 --usage
235 Outputs a terse argument summary.
236
237 --version
238 Displays program version.
239
240
242 lvs.cf(5), ipvsadm(8), lvsd(8), pulse(8).
243
244
246 Philip Copeland <bryce@redhat.com>
247 Erik Troan <ewt@redhat.com>
248 Keith Barrett <kbarrett@redhat.com>
249
250
251
2524th Berkeley Distribution Sat Aug 18 2001 NANNY(8)