3 ms·
Were you trying to parse nginx, apache or haproxy logs? I believe it depends on your logging strategy and then in go access you need to define the log format.
by dragonsh 7y ago
Were you trying to parse nginx, apache or haproxy logs? I believe it depends on your logging strategy and then in go access you need to define the log format.
It will parse according to the log format [1].
For example
$sed -n '/'$(date '+%d\/%b\/%Y' -d '1 week ago')'/,$ p' access.log | goaccess -a -
$awk '$8=$1$8' access.log | goaccess -a -
$goaccess access.log --log-format='%^[ %^[ %^[%x.%^] %^ %^/%^/%^/%^/%L %^ %h:%^"%r" %s %v %^ "%u|%^" %^ %^ %^ %^=%b' --date-format=%s --time-format=%s
These are just some example but I feel using sed or awk for text processing you can feed most of the common access logs with goaccess.
[1] https://goaccess.io/man#custom-log https://goaccess.io/man#custom-log