Stats from NGINX logs using Goaccess

January 24, 2017 | Posted in NGINX

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
    

Related Posts

27 Feb 2017 » Provisioning an ubuntu server for Django, Postgres, NGINX

18 Nov 2015 » Debugging with adb logcat

01 Sep 2015 » Redirecting with NGINX