Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log format error #2713

Open
obayit opened this issue Aug 31, 2024 · 1 comment
Open

Log format error #2713

obayit opened this issue Aug 31, 2024 · 1 comment

Comments

@obayit
Copy link

obayit commented Aug 31, 2024

I am getting this error:

Token '.253.161.20' doesn't match specifier '%h'

Here is a sample line:

3.253.161.20 - - [31/Aug/2024:00:08:58 +0000] "GET /web/login?306 HTTP/1.1" 408 0 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36" "-" "4.981" "-" "-" "-"

Here is my config file:

log-format '%h %^ %^ [%d:%t %^] "%r" "%s" "%b" "%R" "%u" "%^" "%T" "%^" "%^" "%^"'
date-format %d/%b/%Y
time-format %T

goaccess version:

GoAccess - 1.5.5.
For more details visit: https://goaccess.io/
Copyright (C) 2009-2022 by Gerardo Orellana

Build configure arguments:
  --enable-utf8
  --enable-geoip=mmdb
  --with-openssl
@allinurl
Copy link
Owner

This should do it:

# goaccess access.log --log-format='%h %^[%d:%t %^] "%r" %s %b "%R" "%u" %^ "%T" %^' --date-format=%d/%b/%Y --time-format=%T

If you're specifying the format in the config file, use it without quotes, for example:

log-format %h %^[%d:%t %^] "%r" %s %b "%R" "%u" %^ "%T" %^
date-format %d/%b/%Y
time-format %T

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants