Hello!
I am experincing the error message:
GoAccess - version 1.0.2 - Jul 4 2016 19:44:08
Config file: /etc/goaccess.conf
Fatal error has occurred
Error occured at: src/goaccess.c - main - 1230
Nothing valid to process. Verify your date/time/log format.
The error message is unhelpful. I have no idea which of my formats is incorrect. I've tried changing them all to multiple variants, but I always get the same error message and I am clueless.
It would be nice if the error message would be a bit more exact, and give the user some hint where the parsing actually fails to narrow down what should be changed.
My log format:
example.com - - - [23/Oct/2016:06:28:01 +0300] "GET /wp-admin/admin-ajax.php?action=heartbeat HTTP/1.1" 200 59 "-" "speedometer/fal-test1" - 0.044
example.com - - - [23/Oct/2016:06:29:01 +0300] "GET /wp-admin/images/wordpress-logo.png HTTP/1.1" 200 2480 "-" "speedometer/fal-test2" - 0.000
My command:
goaccess --log-format='%h %^ %^ %^ [%d:%t] "%r" %s %b "%R" "%u" %^ %T' --date-format='%d/%b/%Y' --time-format='%H:%M:%S %z' -f test.log
Thanks for pointing this out. This has been implemented - issue #264 addressed this. Feel free to build from development, otherwise, it will be pushed out soon in the upcoming version.
For your log, this is the output:
Token 'example.com' doesn't match specifier '%h'
Token 'example.com' doesn't match specifier '%h'
You will need a valid IPv4/6 for the %h part.
I just built from git master and it works nicely, thanks!
That's great! Stay tuned for the upcoming version, some nice changes are coming :)
Hello,
I have the same problem but with %t
192.168.11.14 - - [09/Jan/2017:22:52:38 +0200] "GET /wp-includes/js/comment-reply.min.js?ver=4.6.1 HTTP/1.1" 200 1078 "http://s1.mysite.com2016/12/29/asdas/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36"
192.168.11.14 - - [09/Jan/2017:22:52:38 +0200] "GET / HTTP/1.1" 200 12222 "http://s1.mysite.com2016/12/29/asdas/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36"
time-format %H:%M:%S %z
also I tried
time-format %H:%M:%S\ %z
log-format %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"
Error:
Token '[09/Jan/2017:22:52:40' doesn't match specifier '%t
@laurfx Try:
goaccess -f access.log --log-format=COMBINED
or
log-format %h %^[%d:%t %^] "%r" %s %b "%R" "%u"
date-format %d/%b/%Y
time-format %T
After I read the documentation better I understand what you did in the last format.
It's working, thank you.
log-format %h %^[%d:%t %^] "%r" %b "%R" "%u"
date-format %d/%b/%Y
time-format %T
for
66.249.76.111 - - [23/Apr/2018:08:03:03 +0000] GET /page.html HTTP/1.1 "200" 7395 "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" "-"
log-format %h %^[%d:%t %^] %m %U %H "%s" "%b" "%R" "%u"
date-format %d/%b/%Y
time-format %T
Most helpful comment
@laurfx Try:
or