Skip to content

Commit

Permalink
web_log: remove trailing space from nginx_ext2 pattern (netdata#6138)
Browse files Browse the repository at this point in the history
* remove trailing space from nginx_ext2 pattern

* handle " in resp_upstream_time

* update module config
  • Loading branch information
ilyam8 authored May 28, 2019
1 parent 8c554e8 commit cac8526
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions collectors/python.d.plugin/web_log/web_log.chart.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -660,7 +659,7 @@ def find_regex(self, last_line):
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>[^"]*)"'
Expand Down
2 changes: 1 addition & 1 deletion collectors/python.d.plugin/web_log/web_log.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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;
#
Expand Down

0 comments on commit cac8526

Please sign in to comment.