GoAccess is a simple tool to draw stats from log files. It works well on NGINX access logs.
You can install it using apt-get install goaccess
. Set some default format configurations in /etc/goaccess.conf
, like:
time-format %H:%M:%S
date-format %d/%b/%Y
log-format %h %^[%d:%t %^] "%r" %s %b
Quick usage instructions
To view a report in the terminal:
goaccess -f access.log
To generate an HTML report:
goaccess -f access.log -a -o report.html
To stat multiple logs:
zcat access.log-*.gz | goaccess -a -o report.html