changes default server_name in access log processor to match the default server name in the proxy server
This commit is contained in:
commit
1b29399896
@ -23,7 +23,7 @@ class_path = swift.stats.access_processor.AccessLogProcessor
|
||||
# load balancer private ips is for load balancer ip addresses that should be
|
||||
# counted as servicenet
|
||||
# lb_private_ips =
|
||||
# server_name = proxy
|
||||
# server_name = proxy-server
|
||||
# user = swift
|
||||
# warn_percent = 0.8
|
||||
|
||||
|
@ -26,7 +26,7 @@ class AccessLogProcessor(object):
|
||||
"""Transform proxy server access logs"""
|
||||
|
||||
def __init__(self, conf):
|
||||
self.server_name = conf.get('server_name', 'proxy')
|
||||
self.server_name = conf.get('server_name', 'proxy-server')
|
||||
self.lb_private_ips = [x.strip() for x in \
|
||||
conf.get('lb_private_ips', '').split(',')\
|
||||
if x.strip()]
|
||||
|
@ -65,7 +65,7 @@ class DumbInternalProxy(object):
|
||||
|
||||
class TestLogProcessor(unittest.TestCase):
|
||||
|
||||
access_test_line = 'Jul 9 04:14:30 saio proxy 1.2.3.4 4.5.6.7 '\
|
||||
access_test_line = 'Jul 9 04:14:30 saio proxy-server 1.2.3.4 4.5.6.7 '\
|
||||
'09/Jul/2010/04/14/30 GET '\
|
||||
'/v1/acct/foo/bar?format=json&foo HTTP/1.0 200 - '\
|
||||
'curl tk4e350daf-9338-4cc6-aabb-090e49babfbd '\
|
||||
|
Loading…
Reference in New Issue
Block a user