Hello! I’ve used Piwik in the past with the JS tracking code, but I’m currently looking at setting it up to track activity on our ezproxy server via the server logs. Currently I do this using AWStats but want the rich dashboard experience of Piwik. I’ve set up a test site on my localhost and pulled over a .log file to play with. The logfile format in AWStats is:
but I’m not sure how to translate this to a Regex for Piwik. I’ve tried running the file with autodetect but repeatedly get Fatal error: cannot automatically determine the log format using the first 100000 lines of the log file.
File “import_logs.py”, line 2314, in
config = Configuration()
File “import_logs.py”, line 864, in init
self._parse_args(self._create_parser())
File “import_logs.py”, line 802, in _parse_args
self.format = RegexFormat(‘custom’, self.options.log_format_regex, self.options.log_date_format)
File “import_logs.py”, line 183, in init
self.regex = re.compile(regex)
File “c:\Python27\lib\re.py”, line 194, in compile
return _compile(pattern, flags)
File “c:\Python27\lib\re.py”, line 251, in _compile
raise error, v # invalid expression
sre_constants.error: unknown specifier: ?P[
Hi! Thanks for getting back to me; how would you suggest I change this up? Sorry if I sound dim, I’m not overly well versed in Regex. Our log file format is (anonymised):
Hi folks, any thoughts on this? I’ve tried a few variations but I can’t find any kind of useful documentation on how to translate this so any pointers on how I can form this Regex would be brilliant!
Please ask a developer or someone who knows Regex and if you find the answer let us know how we can improve our docs so other people don’t have the same issue