Skip to content

Instantly share code, notes, and snippets.

@razorfrog
Created April 24, 2024 17:37
Show Gist options
  • Save razorfrog/8248272dba889619f7cde6afb8dfa512 to your computer and use it in GitHub Desktop.
Save razorfrog/8248272dba889619f7cde6afb8dfa512 to your computer and use it in GitHub Desktop.
http://goaccess.io/man
** install **
apt-get install goaccess
cd /var/log/nginx
**main logs**
zcat access.log.*.gz | goaccess access.log --log-format=COMBINED -o /var/www/sitename.com/htdocs/report-server.html
**all site logs**
zcat *.access.log.*.gz | goaccess --log-format='[%d:%t %^] %h %D %^ %v "%r" %s %b "%R" "%u"' --date-format='%d/%b/%Y' --time-format='%H:%M:%S' -o /var/www/sitename.com/htdocs/report-sites.html
----------
custom goaccess format
[%d:%t %^] %h %D %^ %v "%r" %s %b "%R" "%u"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment