You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This setup generates a nice access log file that looks like:
{"ip": "192.168.1.10","host": "www.test.nl","path": "/","status": "200","referrer": "https://www.test.nl/","user_agent": "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36","length": 915,"generation_time_milli": 0.001,"date": "2015-01-02T13:20:31+01:00"}
When I try to import this access log with:
$ python /var/www/misc/log-analytics/import_logs.py --url=http://webanalyse.domain.local/ --add-sites-new-hosts --recorders=4 --enable-http-errors --enable-http-redirects --enable-static --enable-bots --log-format-name=nginx_json --config /var/www/config/config.ini.php access.log
I get the flowing error:
0 lines parsed, 0 lines recorded, 0 records/sec (avg), 0 records/sec (current)
Parsing log access.log...
Traceback (most recent call last):
File "/var/www/misc/log-analytics/import_logs.py", line 1750, in
main()
File "/var/www/misc/log-analytics/import_logs.py", line 1717, in main
parser.parse(filename)
File "/var/www/misc/log-analytics/import_logs.py", line 1576, in parse
resolver.check_format(format)
File "/var/www/misc/log-analytics/import_logs.py", line 1119, in check_format
elif 'host' not in format.regex.groupindex and not config.options.log_hostname:
AttributeError: 'NoneType' object has no attribute 'groupindex'
As I understands is correctly is it missing the host parameter in the access log but as you can see it is there. What goes wrong?
Kinds regards,
Michiel Piscaer
The text was updated successfully, but these errors were encountered:
Hi,
Like I sad on the forum: http://forum.piwik.org/read.php?2,123133,123166#msg-123166.
I try to import some logs from the nginx webserver into piwik 2.9.1.
I have followed the howto from https://github.com/piwik/piwik/tree/master/misc/log-analytics#setup-nginx-logs.
This setup generates a nice access log file that looks like:
{"ip": "192.168.1.10","host": "www.test.nl","path": "/","status": "200","referrer": "https://www.test.nl/","user_agent": "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36","length": 915,"generation_time_milli": 0.001,"date": "2015-01-02T13:20:31+01:00"}
When I try to import this access log with:
$ python /var/www/misc/log-analytics/import_logs.py --url=http://webanalyse.domain.local/ --add-sites-new-hosts --recorders=4 --enable-http-errors --enable-http-redirects --enable-static --enable-bots --log-format-name=nginx_json --config /var/www/config/config.ini.php access.log
I get the flowing error:
0 lines parsed, 0 lines recorded, 0 records/sec (avg), 0 records/sec (current)
Parsing log access.log...
Traceback (most recent call last):
File "/var/www/misc/log-analytics/import_logs.py", line 1750, in
main()
File "/var/www/misc/log-analytics/import_logs.py", line 1717, in main
parser.parse(filename)
File "/var/www/misc/log-analytics/import_logs.py", line 1576, in parse
resolver.check_format(format)
File "/var/www/misc/log-analytics/import_logs.py", line 1119, in check_format
elif 'host' not in format.regex.groupindex and not config.options.log_hostname:
AttributeError: 'NoneType' object has no attribute 'groupindex'
As I understands is correctly is it missing the host parameter in the access log but as you can see it is there. What goes wrong?
Kinds regards,
Michiel Piscaer
The text was updated successfully, but these errors were encountered: