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.3k stars 1.1k forks source link

Configure format for stdin pipe #2086

Open abitrolly opened 3 years ago

abitrolly commented 3 years ago

goaccess doesn't propose to configure format if the input is from stdin.

✗ gzip -cd 2021-04-10-* | goaccess -c -

GoAccess - version 1.4.6 - Mar 14 2021 00:00:00
Config file: /etc/goaccess/goaccess.conf

Fatal error has occurred
Error occurred at: src/goaccess.c - set_curses - 1490
No time format was found on your conf file.
allinurl commented 3 years ago

Thanks for pointing that out. At the moment this is not supported as it's reading from the pipe.

abitrolly commented 3 years ago

less also reads from pipe, but this somehow works - less < log.log.

allinurl commented 3 years ago

Agreed. You can do read from the pipe with goaccess as such:

# gzip -cd 2021-04-10-* | goaccess --log-format=COMBINED -

or

# goaccess --log-format=COMBINED - < log.log