I installed the cowaxess v1.0.0 x64 package and I am running the following from the command line:
bash-4.4$ goaccess /cygdrive/e/LogFiles/*.log --log-format=W3C --date-format=%Y-%m-%d --time-format=%H:%M:%S.%3N
Parsed 1 linesproducing the following errors:
Token '08:04:11.011' doesn't match specifier '%t'
Format Errors - Verify your log/date/time format
I am looking for a correct way to parse the following time format: 08:04:11.011
The problem here i think is the milliseconds after the seconds, I have tried the following formats:
%H:%M:%S.%N
%H:%M:%S%N
%H:%M:%S.%3N
%H:%M:%S%3N
%T.%3N
%T%3N
%T
they all prove to return the same error message.
Is this possible to parse the time in this format?
Thanks!
Can you please post a few sample lines from your access log?
Sure thing, here are a few lines from IIS Logs:
log.txt
Also, can you please describe the fields so I can come up with the format from my end.
Sure here is a listing in order as they appear in the log:
#Fields:
date-local time-local X-Forwarded-For cs-username s-ip s-port cs-method cs-uri-stem cs-uri-query sc-status sc-substatus sc-win32-status TimeTakenMS cs(User-Agent) cs(Referer) cs(Cookie)
I was going to use the following filter for these logs:
%d %t ~h %e %^ %^ %m %U %q %s %^ %^ %D %u %R %^
Let me know if you need additional info, i will be happy to supply it.
Please try:
goaccess access.log --log-format='%d %t.%^ %^ %^ %h %^ %m %U %q %s %^ %^ %L "%u" %R %^' --date-format=%Y-%m-%d --time-format=%T --http-protocol=no
This worked.
Thanks for looking into this.
Awesome! Feel free to reopen it if needed.