]> arthur.barton.de Git - netdata.git/commitdiff
web_log plugin: replace re.findall with re.search in get_data
authorIlya <ilyamaschenko@gmail.com>
Fri, 10 Feb 2017 01:45:43 +0000 (10:45 +0900)
committerIlya <ilyamaschenko@gmail.com>
Fri, 10 Feb 2017 01:45:43 +0000 (10:45 +0900)
python.d/web_log.chart.py

index eb2b87084a9a05583844525cff1cabf32dc1fbeb..9f049cddb9f72f2b27e26659b6995a4b77b8bfef 100644 (file)
@@ -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