From 276d6f82c615531d36603388092e8b318a3c1b0b Mon Sep 17 00:00:00 2001 From: John Dickinson Date: Thu, 16 Dec 2010 08:03:27 -0600 Subject: [PATCH] fixed lp bug 671704 --- etc/log-processing.conf-sample | 2 +- swift/stats/access_processor.py | 2 +- test/unit/stats/test_log_processor.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/etc/log-processing.conf-sample b/etc/log-processing.conf-sample index 11805add0b..7619d0599a 100644 --- a/etc/log-processing.conf-sample +++ b/etc/log-processing.conf-sample @@ -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 diff --git a/swift/stats/access_processor.py b/swift/stats/access_processor.py index f0ae3a023a..0f5814076f 100644 --- a/swift/stats/access_processor.py +++ b/swift/stats/access_processor.py @@ -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()] diff --git a/test/unit/stats/test_log_processor.py b/test/unit/stats/test_log_processor.py index 1221a05e9e..1a6450139f 100644 --- a/test/unit/stats/test_log_processor.py +++ b/test/unit/stats/test_log_processor.py @@ -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 '\