import_logs.py and custom logs -> invalid log lines


#1

Dear all,
I’m trying to import into piwik our Apache logs but I have for all the lines of my log file a “invalid log lines”.

Here is a line example of the log file:


www.ombudsman.europa.eu	136.173.180.12	136.173.180.12	[21/Nov/2014:13:32:35 +0100]	200	62218	2085387	"GET /lv/atyourservice/team.faces HTTP/1.1"	"http://www.ombudsman.europa.eu/lt/atyourservice/team.faces"	"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:32.0) Gecko/20100101 Firefox/32.0"

My log format is :


LogFormat "%V\t%h\t%h\t%t\t%>s\t%b\t%D\t\"%r\"\t\"%{Referer}i\"\t\"%{User-Agent}i\""

And finaly here is my command line:


python /pathToPiwik/misc/log-analytics/import_logs.py \
 -d \
 --url=http://localhost/piwik/ \
 --dry-run \
 --show-progress \
 --add-sites-new-hosts \
 --idsite=1 \
 --enable-static \
 --enable-bots \
 --enable-http-errors \
 --enable-http-redirects \
 --enable-reverse-dns \
 --replay-tracking \
--log-format-regex='(?P<host>\S+) (?P<ip>\S+) \S+ \[(?P<date>.*?) (?P<timezone>.*?)\] (?P<status>\S+) (?P<length>\S+) (?P<session_time>\S+) "\S+ (?P<path>.*?) \S+" "(?P<referrer>.*?)" "(?P<user_agent>.*?)"' \
/pathToLogs/access.log

Does someone knows what is wrong in my regex ?

Many thanks

Marc AT