allinurl / goaccess

GoAccess is a real-time web log analyzer and interactive viewer that runs in a terminal in *nix systems or through your browser.

Home Page:https://goaccess.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Token '2015-09-09' doesn't match specifier '%d'

25808383 opened this issue · comments

Did a fair amount of digging and still not seeing what i'm missing here.

GoAccess Command:
goaccess -f output.log --log-format='%d %t %h %^ %e %m %U %q %s %^ %b %^ %H' --date-format=%Y-%m-%d --time-format=%T -a -o report.html

Parsed 1 linesproducing the following errors:

Token '2015-09-09' doesn't match specifier '%d'

Format Errors - Verify your log/date/time format

Log: 
2015-09-09 18:20:26 192.168.3.35 - - [1]GET / - 302 987 260 - 443 
2015-09-09 18:20:26 192.168.3.35 - - [2]GET /EFTClient/Account/Login.htm - 200 5222 314 - 443 
2015-09-09 18:20:26 192.168.3.35 - - [3]GET /EFTClient/Shared/forms.css - 200 3687 353 - 443 

This works for me:

goaccess access.log --log-format='%d %t %h %^ %^]%m %U %q %s %D %b %^' --date-format=%Y-%m-%d --time-format=%T --http-protocol=no --ignore-panel=OS --ignore-panel=BROWSERS --ignore-panel=REFERRING_SITES

Same result, I am using CowAxcess if that makes a difference.

bash-4.4$ goaccess output.log --log-format='%d %t %h %^ %^]%m %U %q %s %D %b %^' --date-format=%Y-%m-%d --time-format=%T --http-protocol=no --ignore-panel=OS --ignore-panel=BROWSERS --ignore-panel=REFERRING_SITES

Parsed 1 linesproducing the following errors:

Token '2015-09-09' doesn't match specifier '%d'

What's your locale? e.g., locale -a

I tried it in ubuntu (on windows) and got the same result. Cygwin bundled with goaccess didn't have the locale command built-in. I also tried setting the LANG variable but didn't make a difference. Also tried converting the file from Windows (DOS) to unix, no difference, same error.

goaccess output.log --log-format='%d %t %h %^ %^]%m %U %q %s %D %b %^' --date-format=%Y-%m-%d --time-format=%T --http-protocol=no --ignore-panel=OS --ignore-panel=BROWSERS --ignore-panel=REFERRING_SITES
Parsed 1 linesproducing the following errors:

Token '2015-09-09' doesn't match specifier '%d'

Format Errors - Verify your log/date/time format

locale -a
C
C.UTF-8
POSIX
en_US.utf8

When I look at the file in VI/VIM I don't show a space before the first line but I do see it when I view via "head". When I delete the first line the space shows up on whatever is the first line.

$ head output.log
2015-09-09 18:20:26 192.168.3.35 - - [3]GET /EFTClient/Shared/forms.css - 200 3687 353 - 443
2015-09-09 18:20:26 192.168.3.35 - - [5]GET /EFTClient/Shared/PTCs.js - 200 2195 371 - 443
2015-09-09 18:20:26 192.168.3.35 - - [4]GET /EFTClient/Shared/jquery-1.4.2.min.js - 200 72476 383 - 443

The space was the issue, I still don't get where that is coming from and why it persists (on the new first line) when I delete the line but I just read the files in backward with tac and was able to get my data imported.