diff options
author | Ilya Mashchenko <ilya@netdata.cloud> | 2019-05-28 12:21:07 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-28 12:21:07 +0300 |
commit | cac85261176150567c13e0719dbaaaef5127a908 (patch) | |
tree | 8e1a0dab64c3703a83be66dfd87e4b09269c6b27 | |
parent | 8c554e8ab953736db4e0c4f3d84a890f63aef3c8 (diff) |
web_log: remove trailing space from nginx_ext2 pattern (#6138)
* remove trailing space from nginx_ext2 pattern
* handle " in resp_upstream_time
* update module config
-rw-r--r-- | collectors/python.d.plugin/web_log/web_log.chart.py | 5 | ||||
-rw-r--r-- | collectors/python.d.plugin/web_log/web_log.conf | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/collectors/python.d.plugin/web_log/web_log.chart.py b/collectors/python.d.plugin/web_log/web_log.chart.py index 6d6a261c43..755be6fdd5 100644 --- a/collectors/python.d.plugin/web_log/web_log.chart.py +++ b/collectors/python.d.plugin/web_log/web_log.chart.py @@ -4,9 +4,8 @@ # SPDX-License-Identifier: GPL-3.0-or-later import bisect -import re import os - +import re from collections import namedtuple, defaultdict from copy import deepcopy @@ -660,7 +659,7 @@ class Web: r' (?P<bytes_sent>\d+)' r' (?P<resp_length>\d+)' r' (?P<resp_time>\d+\.\d+)' - r' (?P<resp_time_upstream>[\d.-]+) ') + r' "?(?P<resp_time_upstream>[\d.-]+)') nginx_ext_append = re.compile(r'(?P<address>[\da-f.:]+)' r' -.*?"(?P<request>[^"]*)"' diff --git a/collectors/python.d.plugin/web_log/web_log.conf b/collectors/python.d.plugin/web_log/web_log.conf index 220b7c2831..b59b2c562a 100644 --- a/collectors/python.d.plugin/web_log/web_log.conf +++ b/collectors/python.d.plugin/web_log/web_log.conf @@ -97,7 +97,7 @@ # nginx: # log_format netdata '$remote_addr - $remote_user [$time_local] ' # '"$request" $status $body_bytes_sent ' -# '$request_length $request_time $upstream_response_time ' +# '$request_length $request_time "$upstream_response_time" ' # '"$http_referer" "$http_user_agent"'; # access_log /var/log/nginx/access.log netdata; # |