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.
https://goaccess.io
MIT License
18.38k stars 1.11k forks source link

Token '2019-08-07' doesn't match specifier '%h' #1600

Closed phatjak closed 2 years ago

phatjak commented 4 years ago

I am trying to load an IIS log file to goaccess, and I get the message above.

Any suggestions? I have tried to edit the goaccess.conf file but no progress.

allinurl commented 4 years ago

Please post a few lines from your access log and the description of each field.

phatjak commented 4 years ago
#Software: Microsoft Internet Information Services 10.0
#Version: 1.0
#Date: 2019-06-25 00:47:37
#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) cs(Referer) sc-status sc-substatus sc-win32-status time-taken
2019-06-25 00:47:37 10.22.1.7 POST /apc/apcwebservice.asmx - 443 - 3.216.62.60 Mozilla/4.0+(compatible;+MSIE+6.0;+MS+Web+Services+Client+Protocol+4.0.30319.42000) - 200 0 0 875
2019-06-25 00:47:37 10.22.1.7 POST /apc/apcwebservice.asmx - 443 - 166.239.39.225 Mozilla/4.0+(compatible;+MSIE+6.0;+MS+Web+Services+Client+Protocol+4.0.30319.42000) - 200 0 0 156
0bi-w6n-K3nobi commented 4 years ago

Try this, in goaccess.conf:

time-format %T or in same way time-format %H:%M:%S date-format %F log-format %d %t %v %m %U %^ %^ %^ %h %u %R %s %^ %^ %L

or in command-line: --time-format='...' --date-format='...' --log-format='...'

notes: I used the server's IP for VHOST. If you don't want to change %v with %^ and disable it and the Virtual Hosts panel will be too.

I assumed the time-taken field is in milliseconds.

allinurl commented 2 years ago

Closing this.