27
28
ORDER_APACHE_CACHE = ['apache_cache']
29
30
-ORDER_WEB = ['response_statuses', 'response_codes', 'bandwidth',
31
- 'response_time', 'response_time_hist', 'response_time_upstream', 'response_time_upstream_hist',
32
- 'requests_per_url', 'requests_per_user_defined', 'http_method', 'vhost', 'port', 'http_version',
33
- 'requests_per_ipproto', 'clients', 'clients_all']
34
-
35
-ORDER_SQUID = ['squid_response_statuses', 'squid_response_codes', 'squid_detailed_response_codes',
36
- 'squid_method', 'squid_mime_type', 'squid_hier_code', 'squid_transport_methods',
37
- 'squid_transport_errors', 'squid_code', 'squid_handling_opts', 'squid_object_types',
38
- 'squid_cache_events', 'squid_bytes', 'squid_duration', 'squid_clients', 'squid_clients_all']
30
+ORDER_WEB = [
31
+ 'response_statuses',
32
+ 'response_codes',
33
+ 'bandwidth',
34
+ 'response_time',
35
+ 'response_time_hist',
36
+ 'response_time_upstream',
37
+ 'response_time_upstream_hist',
38
+ 'requests_per_url',
39
+ 'requests_per_user_defined',
40
+ 'http_method',
41
+ 'vhost',
42
+ 'port',
43
+ 'http_version',
44
+ 'requests_per_ipproto',
45
+ 'clients',
46
+ 'clients_all'
47
+]
48
+
49
+ORDER_SQUID = [
50
+ 'squid_response_statuses',
51
+ 'squid_response_codes',
52
+ 'squid_detailed_response_codes',
53
+ 'squid_method',
54
+ 'squid_mime_type',
55
+ 'squid_hier_code',
56
+ 'squid_transport_methods',
57
+ 'squid_transport_errors',
58
+ 'squid_code',
59
+ 'squid_handling_opts',
60
+ 'squid_object_types',
61
+ 'squid_cache_events',
62
+ 'squid_bytes',
63
+ 'squid_duration',
64
+ 'squid_clients',
65
+ 'squid_clients_all'
66
+]
67
68
CHARTS_WEB = {
69
'response_codes': {
76
['1xx', None, 'incremental'],
77
['0xx', 'other', 'incremental'],
78
['unmatched', None, 'incremental']
51
- ]},
79
+ ]
80
+ },
81
'bandwidth': {
82
'options': [None, 'Bandwidth', 'kilobits/s', 'bandwidth', 'web_log.bandwidth', 'area'],
83
'lines': [
84
['resp_length', 'received', 'incremental', 8, 1000],
85
['bytes_sent', 'sent', 'incremental', -8, 1000]
57
- ]},
86
+ ]
87
+ },
88
'response_time': {
89
'options': [None, 'Processing Time', 'milliseconds', 'timings', 'web_log.response_time', 'area'],
90
'lines': [
91
['resp_time_min', 'min', 'incremental', 1, 1000],
92
['resp_time_max', 'max', 'incremental', 1, 1000],
93
['resp_time_avg', 'avg', 'incremental', 1, 1000]
64
- ]},
94
+ ]
95
+ },
96
'response_time_hist': {
97
'options': [None, 'Processing Time Histogram', 'requests/s', 'timings', 'web_log.response_time_hist', 'line'],
67
- 'lines': [
68
- ]},
98
+ 'lines': []
99
+ },
100
'response_time_upstream': {
101
'options': [None, 'Processing Time Upstream', 'milliseconds', 'timings',
102
'web_log.response_time_upstream', 'area'],
104
['resp_time_upstream_min', 'min', 'incremental', 1, 1000],
105
['resp_time_upstream_max', 'max', 'incremental', 1, 1000],
106
['resp_time_upstream_avg', 'avg', 'incremental', 1, 1000]
76
- ]},
107
+ ]
108
+ },
109
'response_time_upstream_hist': {
110
'options': [None, 'Processing Time Histogram', 'requests/s', 'timings',
111
'web_log.response_time_upstream_hist', 'line'],
80
- 'lines': [
81
- ]},
112
+ 'lines': []
113
+ },
114
'clients': {
115
'options': [None, 'Current Poll Unique Client IPs', 'unique ips', 'clients', 'web_log.clients', 'stacked'],
116
'lines': [
117
['unique_cur_ipv4', 'ipv4', 'incremental', 1, 1],
118
['unique_cur_ipv6', 'ipv6', 'incremental', 1, 1]
87
- ]},
119
+ ]
120
+ },
121
'clients_all': {
122
'options': [None, 'All Time Unique Client IPs', 'unique ips', 'clients', 'web_log.clients_all', 'stacked'],
123
'lines': [
124
['unique_tot_ipv4', 'ipv4', 'absolute', 1, 1],
125
['unique_tot_ipv6', 'ipv6', 'absolute', 1, 1]
93
- ]},
126
+ ]
127
+ },
128
'http_method': {
129
'options': [None, 'Requests Per HTTP Method', 'requests/s', 'http methods', 'web_log.http_method', 'stacked'],
130
'lines': [
131
['GET', 'GET', 'incremental', 1, 1]
98
- ]},
132
+ ]
133
+ },
134
'http_version': {
135
'options': [None, 'Requests Per HTTP Version', 'requests/s', 'http versions',
136
'web_log.http_version', 'stacked'],
102
- 'lines': []},
137
+ 'lines': []
138
+ },
139
'requests_per_ipproto': {
140
'options': [None, 'Requests Per IP Protocol', 'requests/s', 'ip protocols', 'web_log.requests_per_ipproto',
141
'stacked'],
142
'lines': [
143
['req_ipv4', 'ipv4', 'incremental', 1, 1],
144
['req_ipv6', 'ipv6', 'incremental', 1, 1]
109
- ]},
145
+ ]
146
+ },
147
'response_statuses': {
111
- 'options': [None, 'Response Statuses', 'requests/s', 'responses', 'web_log.response_statuses',
112
- 'stacked'],
148
+ 'options': [None, 'Response Statuses', 'requests/s', 'responses', 'web_log.response_statuses', 'stacked'],
149
'lines': [
150
['successful_requests', 'success', 'incremental', 1, 1],
151
['server_errors', 'error', 'incremental', 1, 1],
152
['redirects', 'redirect', 'incremental', 1, 1],
153
['bad_requests', 'bad', 'incremental', 1, 1],
154
['other_requests', 'other', 'incremental', 1, 1]
119
- ]},
155
+ ]
156
+ },
157
'requests_per_url': {
121
- 'options': [None, 'Requests Per Url', 'requests/s', 'urls', 'web_log.requests_per_url',
122
- 'stacked'],
158
+ 'options': [None, 'Requests Per Url', 'requests/s', 'urls', 'web_log.requests_per_url', 'stacked'],
159
'lines': [
160
['url_pattern_other', 'other', 'incremental', 1, 1]
125
- ]},
161
+ ]
162
+ },
163
'requests_per_user_defined': {
164
'options': [None, 'Requests Per User Defined Pattern', 'requests/s', 'user defined',
165
'web_log.requests_per_user_defined', 'stacked'],
166
'lines': [
167
['user_pattern_other', 'other', 'incremental', 1, 1]
131
- ]},
168
+ ]
169
+ },
170
'port': {
133
- 'options': [None, 'Requests Per Port', 'requests/s', 'port',
134
- 'web_log.port', 'stacked'],
171
+ 'options': [None, 'Requests Per Port', 'requests/s', 'port', 'web_log.port', 'stacked'],
172
'lines': [
173
['port_80', 'http', 'incremental', 1, 1],
174
['port_443', 'https', 'incremental', 1, 1]
138
- ]},
175
+ ]
176
+ },
177
'vhost': {
140
- 'options': [None, 'Requests Per Vhost', 'requests/s', 'vhost',
141
- 'web_log.vhost', 'stacked'],
142
- 'lines': [
143
- ]}
178
+ 'options': [None, 'Requests Per Vhost', 'requests/s', 'vhost', 'web_log.vhost', 'stacked'],
179
+ 'lines': []
180
+ }
181
}
182
183
CHARTS_APACHE_CACHE = {
185
'options': [None, 'Apache Cached Responses', 'percent cached', 'cached', 'web_log.apache_cache_cache',
186
'stacked'],
187
'lines': [
151
- ["hit", 'cache', "percentage-of-absolute-row"],
152
- ["miss", None, "percentage-of-absolute-row"],
153
- ["other", None, "percentage-of-absolute-row"]
154
- ]}
188
+ ['hit', 'cache', 'percentage-of-absolute-row'],
189
+ ['miss', None, 'percentage-of-absolute-row'],
190
+ ['other', None, 'percentage-of-absolute-row']
191
+ ]
192
+ }
193
}
194
195
CHARTS_SQUID = {
200
['duration_min', 'min', 'incremental', 1, 1000],
201
['duration_max', 'max', 'incremental', 1, 1000],
202
['duration_avg', 'avg', 'incremental', 1, 1000]
165
- ]},
203
+ ]
204
+ },
205
'squid_bytes': {
206
'options': [None, 'Amount Of Data Delivered To The Clients',
207
'kilobits/s', 'squid_bandwidth', 'web_log.squid_bytes', 'area'],
208
'lines': [
209
['bytes', 'sent', 'incremental', 8, 1000]
171
- ]},
210
+ ]
211
+ },
212
'squid_response_statuses': {
213
'options': [None, 'Response Statuses', 'responses/s', 'squid_responses', 'web_log.squid_response_statuses',
214
'stacked'],
218
['redirects', 'redirect', 'incremental', 1, 1],
219
['bad_requests', 'bad', 'incremental', 1, 1],
220
['other_requests', 'other', 'incremental', 1, 1]
181
- ]},
221
+ ]
222
+ },
223
'squid_response_codes': {
224
'options': [None, 'Response Codes', 'responses/s', 'squid_responses',
225
'web_log.squid_response_codes', 'stacked'],
232
['0xx', None, 'incremental'],
233
['other', None, 'incremental'],
234
['unmatched', None, 'incremental']
194
- ]},
235
+ ]
236
+ },
237
'squid_code': {
238
'options': [None, 'Responses Per Cache Result Of The Request',
239
'requests/s', 'squid_squid_cache', 'web_log.squid_code', 'stacked'],
198
- 'lines': [
199
- ]},
240
+ 'lines': []
241
+ },
242
'squid_detailed_response_codes': {
243
'options': [None, 'Detailed Response Codes',
244
'responses/s', 'squid_responses', 'web_log.squid_detailed_response_codes', 'stacked'],
203
- 'lines': [
204
- ]},
245
+ 'lines': []
246
+ },
247
'squid_hier_code': {
248
'options': [None, 'Responses Per Hierarchy Code',
249
'requests/s', 'squid_hierarchy', 'web_log.squid_hier_code', 'stacked'],
208
- 'lines': [
209
- ]},
250
+ 'lines': []
251
+ },
252
'squid_method': {
253
'options': [None, 'Requests Per Method',
254
'requests/s', 'squid_requests', 'web_log.squid_method', 'stacked'],
213
- 'lines': [
214
- ]},
255
+ 'lines': []
256
+ },
257
'squid_mime_type': {
258
'options': [None, 'Requests Per MIME Type',
259
'requests/s', 'squid_requests', 'web_log.squid_mime_type', 'stacked'],
218
- 'lines': [
219
- ]},
260
+ 'lines': []
261
+ },
262
'squid_clients': {
263
'options': [None, 'Current Poll Unique Client IPs', 'unique ips', 'squid_clients',
264
'web_log.squid_clients', 'stacked'],
265
'lines': [
266
['unique_ipv4', 'ipv4', 'incremental'],
267
['unique_ipv6', 'ipv6', 'incremental']
226
- ]},
268
+ ]
269
+ },
270
'squid_clients_all': {
271
'options': [None, 'All Time Unique Client IPs', 'unique ips', 'squid_clients',
272
'web_log.squid_clients_all', 'stacked'],
273
'lines': [
274
['unique_tot_ipv4', 'ipv4', 'absolute'],
275
['unique_tot_ipv6', 'ipv6', 'absolute']
233
- ]},
276
+ ]
277
+ },
278
'squid_transport_methods': {
279
'options': [None, 'Transport Methods', 'requests/s', 'squid_squid_transport',
280
'web_log.squid_transport_methods', 'stacked'],
237
- 'lines': [
238
- ]},
281
+ 'lines': []
282
+ },
283
'squid_transport_errors': {
284
'options': [None, 'Transport Errors', 'requests/s', 'squid_squid_transport',
285
'web_log.squid_transport_errors', 'stacked'],
242
- 'lines': [
243
- ]},
286
+ 'lines': []
287
+ },
288
'squid_handling_opts': {
289
'options': [None, 'Handling Opts', 'requests/s', 'squid_squid_cache',
290
'web_log.squid_handling_opts', 'stacked'],
247
- 'lines': [
248
- ]},
291
+ 'lines': []
292
+ },
293
'squid_object_types': {
294
'options': [None, 'Object Types', 'objects/s', 'squid_squid_cache',
295
'web_log.squid_object_types', 'stacked'],
252
- 'lines': [
253
- ]},
296
+ 'lines': []
297
+ },
298
'squid_cache_events': {
299
'options': [None, 'Cache Events', 'events/s', 'squid_squid_cache',
300
'web_log.squid_cache_events', 'stacked'],
257
- 'lines': [
258
- ]}
301
+ 'lines': []
302
+ }
303
}
304
305
NAMED_PATTERN = namedtuple('PATTERN', ['description', 'func'])
306
307
DET_RESP_AGGR = ['', '_1xx', '_2xx', '_3xx', '_4xx', '_5xx', '_Other']
308
265
-SQUID_CODES = dict(TCP='squid_transport_methods', UDP='squid_transport_methods', NONE='squid_transport_methods',
266
- CLIENT='squid_handling_opts', IMS='squid_handling_opts', ASYNC='squid_handling_opts',
267
- SWAPFAIL='squid_handling_opts', REFRESH='squid_handling_opts', SHARED='squid_handling_opts',
268
- REPLY='squid_handling_opts', NEGATIVE='squid_object_types', STALE='squid_object_types',
269
- OFFLINE='squid_object_types', INVALID='squid_object_types', FAIL='squid_object_types',
270
- MODIFIED='squid_object_types', UNMODIFIED='squid_object_types', REDIRECT='squid_object_types',
271
- HIT='squid_cache_events', MEM='squid_cache_events', MISS='squid_cache_events',
272
- DENIED='squid_cache_events', NOFETCH='squid_cache_events', TUNNEL='squid_cache_events',
273
- ABORTED='squid_transport_errors', TIMEOUT='squid_transport_errors')
309
+SQUID_CODES = {
310
+ 'TCP': 'squid_transport_methods',
311
+ 'UDP': 'squid_transport_methods',
312
+ 'NONE': 'squid_transport_methods',
313
+ 'CLIENT': 'squid_handling_opts',
314
+ 'IMS': 'squid_handling_opts',
315
+ 'ASYNC': 'squid_handling_opts',
316
+ 'SWAPFAIL': 'squid_handling_opts',
317
+ 'REFRESH': 'squid_handling_opts',
318
+ 'SHARED': 'squid_handling_opts',
319
+ 'REPLY': 'squid_handling_opts',
320
+ 'NEGATIVE': 'squid_object_types',
321
+ 'STALE': 'squid_object_types',
322
+ 'OFFLINE': 'squid_object_types',
323
+ 'INVALID': 'squid_object_types',
324
+ 'FAIL': 'squid_object_types',
325
+ 'MODIFIED': 'squid_object_types',
326
+ 'UNMODIFIED': 'squid_object_types',
327
+ 'REDIRECT': 'squid_object_types',
328
+ 'HIT': 'squid_cache_events',
329
+ 'MEM': 'squid_cache_events',
330
+ 'MISS': 'squid_cache_events',
331
+ 'DENIED': 'squid_cache_events',
332
+ 'NOFETCH': 'squid_cache_events',
333
+ 'TUNNEL': 'squid_cache_events',
334
+ 'ABORTED': 'squid_transport_errors',
335
+ 'TIMEOUT': 'squid_transport_errors'
336
+}
337
338
REQUEST_REGEX = re.compile(r'(?P<method>[A-Z]+) (?P<url>[^ ]+) [A-Z]+/(?P<http_version>\d(?:.\d)?)')
339
340
MIME_TYPES = ['application', 'audio', 'example', 'font', 'image', 'message', 'model', 'multipart', 'text', 'video']
341
342
+
343
class Service(LogService):
344
def __init__(self, configuration=None, name=None):
345
"""
365
log_types = dict(web=Web, apache_cache=ApacheCache, squid=Squid)
366
367
if log_type not in log_types:
304
- self.error("bad log type {log_type}. Supported types: {types}".format(log_type=log_type,
368
+ self.error('bad log type {log_type}. Supported types: {types}'.format(log_type=log_type,
369
types=log_types.keys()))
370
return False
371
399
self.definitions = deepcopy(CHARTS_WEB)
400
self.pre_filter = check_patterns('filter', self.configuration.get('filter'))
401
self.storage = dict()
338
- self.data = {'bytes_sent': 0, 'resp_length': 0, 'resp_time_min': 0, 'resp_time_max': 0,
339
- 'resp_time_avg': 0, 'resp_time_upstream_min': 0, 'resp_time_upstream_max': 0,
340
- 'resp_time_upstream_avg': 0, 'unique_cur_ipv4': 0, 'unique_cur_ipv6': 0, '2xx': 0,
341
- '5xx': 0, '3xx': 0, '4xx': 0, '1xx': 0, '0xx': 0, 'unmatched': 0, 'req_ipv4': 0,
342
- 'req_ipv6': 0, 'unique_tot_ipv4': 0, 'unique_tot_ipv6': 0, 'successful_requests': 0,
343
- 'redirects': 0, 'bad_requests': 0, 'server_errors': 0, 'other_requests': 0, 'GET': 0}
402
+ self.data = {
403
+ 'bytes_sent': 0,
404
+ 'resp_length': 0,
405
+ 'resp_time_min': 0,
406
+ 'resp_time_max': 0,
407
+ 'resp_time_avg': 0,
408
+ 'resp_time_upstream_min': 0,
409
+ 'resp_time_upstream_max': 0,
410
+ 'resp_time_upstream_avg': 0,
411
+ 'unique_cur_ipv4': 0,
412
+ 'unique_cur_ipv6': 0,
413
+ '2xx': 0,
414
+ '5xx': 0,
415
+ '3xx': 0,
416
+ '4xx': 0,
417
+ '1xx': 0,
418
+ '0xx': 0,
419
+ 'unmatched': 0,
420
+ 'req_ipv4': 0,
421
+ 'req_ipv6': 0,
422
+ 'unique_tot_ipv4': 0,
423
+ 'unique_tot_ipv6': 0,
424
+ 'successful_requests': 0,
425
+ 'redirects': 0,
426
+ 'bad_requests': 0,
427
+ 'server_errors': 0,
428
+ 'other_requests': 0,
429
+ 'GET': 0
430
+ }
431
432
def __getattr__(self, item):
433
return getattr(self.service, item)
478
hist_lines = self.definitions['response_time_hist']['lines']
479
upstream_hist_lines = self.definitions['response_time_upstream_hist']['lines']
480
for i, le in enumerate(histogram):
394
- hist_key = "response_time_hist_%d" % i
395
- upstream_hist_key = "response_time_upstream_hist_%d" % i
481
+ hist_key = 'response_time_hist_%d' % i
482
+ upstream_hist_key = 'response_time_upstream_hist_%d' % i
483
hist_lines.append([hist_key, str(le), 'incremental', 1, 1])
484
upstream_hist_lines.append([upstream_hist_key, str(le), 'incremental', 1, 1])
485
399
- hist_lines.append(["response_time_hist_%d" % len(histogram), '+Inf', 'incremental', 1, 1])
400
- upstream_hist_lines.append(["response_time_upstream_hist_%d" % len(histogram), '+Inf', 'incremental', 1, 1])
486
+ hist_lines.append(['response_time_hist_%d' % len(histogram), '+Inf', 'incremental', 1, 1])
487
+ upstream_hist_lines.append(['response_time_upstream_hist_%d' % len(histogram), '+Inf', 'incremental', 1, 1])
488
elif histogram is not None:
402
- self.error("expect histogram list, but was {0}".format(type(histogram)))
489
+ self.error('expect histogram list, but was {0}'.format(type(histogram)))
490
491
if not self.configuration.get('all_time', True):
492
self.order.remove('clients_all')
500
501
for code in codes:
502
self.order.append('detailed_response_codes%s' % code)
416
- self.definitions['detailed_response_codes%s' % code] \
417
- = {'options': [None, 'Detailed Response Codes %s' % code[1:], 'requests/s', 'responses',
418
- 'web_log.detailed_response_codes%s' % code, 'stacked'],
419
- 'lines': []}
503
+ self.definitions['detailed_response_codes%s' % code] = {
504
+ 'options': [None, 'Detailed Response Codes %s' % code[1:], 'requests/s', 'responses',
505
+ 'web_log.detailed_response_codes%s' % code, 'stacked'],
506
+ 'lines': []
507
+ }
508
509
# Add 'requests_per_url' chart if specified in the configuration
510
if self.storage['url_pattern']:
605
buckets = self.storage['buckets']
606
upstream_buckets = self.storage['upstream_buckets']
607
for i in range(0, len(self.storage['bucket_index'])):
520
- hist_key = "response_time_hist_%d" % i
521
- upstream_hist_key = "response_time_upstream_hist_%d" % i
608
+ hist_key = 'response_time_hist_%d' % i
609
+ upstream_hist_key = 'response_time_upstream_hist_%d' % i
610
self.data[hist_key] = buckets[i]
611
self.data[upstream_hist_key] = upstream_buckets[i]
612
911
self.definitions = CHARTS_SQUID
912
self.pre_filter = check_patterns('filter', self.configuration.get('filter'))
913
self.storage = dict()
826
- self.data = {'duration_max': 0, 'duration_avg': 0, 'duration_min': 0, 'bytes': 0,
827
- '0xx': 0, '1xx': 0, '2xx': 0, '3xx': 0, '4xx': 0, '5xx': 0,
828
- 'other': 0, 'unmatched': 0, 'unique_ipv4': 0, 'unique_ipv6': 0,
829
- 'unique_tot_ipv4': 0, 'unique_tot_ipv6': 0, 'successful_requests': 0,
830
- 'redirects': 0, 'bad_requests': 0, 'server_errors': 0, 'other_requests': 0
831
- }
914
+ self.data = {
915
+ 'duration_max': 0,
916
+ 'duration_avg': 0,
917
+ 'duration_min': 0,
918
+ 'bytes': 0,
919
+ '0xx': 0,
920
+ '1xx': 0,
921
+ '2xx': 0,
922
+ '3xx': 0,
923
+ '4xx': 0,
924
+ '5xx': 0,
925
+ 'other': 0,
926
+ 'unmatched': 0,
927
+ 'unique_ipv4': 0,
928
+ 'unique_ipv6': 0,
929
+ 'unique_tot_ipv4': 0,
930
+ 'unique_tot_ipv6': 0,
931
+ 'successful_requests': 0,
932
+ 'redirects': 0,
933
+ 'bad_requests': 0,
934
+ 'server_errors': 0,
935
+ 'other_requests': 0
936
+ }
937
938
def __getattr__(self, item):
939
return getattr(self.service, item)
959
self.error('Regex not matches (%s)' % self.storage['regex'].pattern)
960
return False
961
self.storage['dynamic'] = {
857
- 'http_code':
858
- {'chart': 'squid_detailed_response_codes',
962
+ 'http_code': {
963
+ 'chart': 'squid_detailed_response_codes',
964
'func_dim_id': None,
860
- 'func_dim': None},
965
+ 'func_dim': None
966
+ },
967
'hier_code': {
968
'chart': 'squid_hier_code',
969
'func_dim_id': None,
864
- 'func_dim': lambda v: v.replace('HIER_', '')},
970
+ 'func_dim': lambda v: v.replace('HIER_', '')
971
+ },
972
'method': {
973
'chart': 'squid_method',
974
'func_dim_id': None,
868
- 'func_dim': None},
975
+ 'func_dim': None
976
+ },
977
'mime_type': {
978
'chart': 'squid_mime_type',
979
'func_dim_id': lambda v: str.lower(v) if str.lower(v) in MIME_TYPES else 'unknown',
872
- 'func_dim': None}}
980
+ 'func_dim': None
981
+ }
982
+ }
983
if not self.configuration.get('all_time', True):
984
self.order.remove('squid_clients_all')
985
return True
1096
timings['summary'] += time
1097
timings['count'] += 1
1098
1099
+
1100
def get_hist(index, buckets, time):
1101
"""
1102
:param index: histogram index (Ex. [10, 50, 100, 150, ...])
1110
else:
1111
break
1112
1113
+
1114
def address_not_in_pool(pool, address, pool_size):
1115
"""
1116
:param pool: list of ip addresses