update very inefficient regex (thanks to @l2isbad in #3734)
VPNable committed
May 21, 2018 at 14:45 UTC
6b268974797817286541235ee94175383c5d51b2
1 file changed
+1
-1
python.d/ovpn_status_log.chart.py
+1
-1
@@ -32,7 +32,7 @@ class Service(SimpleService):
32
self.order = ORDER
33
self.definitions = CHARTS
34
self.log_path = self.configuration.get('log_path')
35
- self.regex = dict(tls=r_compile(r'(?:(?:[0-9a-f]|:){1,4}(:(?:[0-9a-f]{0,4})*){1,7}|(?:\d{1,3}(?:\.\d{1,3}){3}(?::\d+)?)) (?P<bytes_in>\d+) (?P<bytes_out>\d+)'),
35
+ self.regex = dict(tls=r_compile(r'(?:[0-9a-f:]+|(?:\d{1,3}(?:\.\d{1,3}){3}(?::\d+)?)) (?P<bytes_in>\d+) (?P<bytes_out>\d+)'),
36
static_key=r_compile(r'TCP/[A-Z]+ (?P<direction>(?:read|write)) bytes,(?P<bytes>\d+)'))
37
38
def check(self):