1

How to parse docker logs output / tail output through goaccess? When I do:

docker container logs mycontainer > logs

and then goaccess -f logs it works perfectly, but if I do docker logs --tail all mycontainer | goaccess - it doesn't work :( but in the manual you can do this via tailing command: https://goaccess.io/man

tail -f access.log | goaccess -

Pls help :( I think the problem is that the native tailing differs from docker's?

3

What do you mean by "it doesn't work"? I got an error suggesting that the log format wasn't correct:

Fatal error has occurred
Error occured at: src/goaccess.c - set_curses - 1394
No time format was found on your conf file.

When I edited /etc/goaccess.conf (i.e. uncommented/selected time-format, date-format and log-format) the docker logs mycontainer | goaccess - command works as expected.

As an aside, for my nginx proxy inside my docker container, I had to set my log_format as follows:

log-format %v %h %^ %^ [%d:%t %^] "%r" %s %b "%R" "%u"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.