diff options
author | Ilya <ilyamaschenko@gmail.com> | 2017-02-10 10:45:43 +0900 |
---|---|---|
committer | Ilya <ilyamaschenko@gmail.com> | 2017-02-10 10:45:43 +0900 |
commit | cdaea61f1f12a764ca94324bbdedbcbfefb8871c (patch) | |
tree | 7fb90cee501fad18228f31b4d4e0ad8c94e9ba5e /python.d/web_log.chart.py | |
parent | 494ba3cb7c96e3e1230141bdd3e39bcc25288ae3 (diff) |
web_log plugin: replace re.findall with re.search in get_data
Diffstat (limited to 'python.d/web_log.chart.py')
-rw-r--r-- | python.d/web_log.chart.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/python.d/web_log.chart.py b/python.d/web_log.chart.py index eb2b87084a..9f049cddb9 100644 --- a/python.d/web_log.chart.py +++ b/python.d/web_log.chart.py @@ -268,9 +268,9 @@ class Service(LogService): default_dict = defaultdict(lambda: 0) for line in raw: - match = self.regex.findall(line) + match = self.regex.search(line) if match: - match_dict = dict(zip_longest('address method url code sent resp_length resp_time'.split(), match[0])) + match_dict = dict(zip_longest('address method url code sent resp_length resp_time'.split(), match.groups())) try: code = ''.join([match_dict['code'][0], 'xx']) to_netdata[code] += 1 |