How to install GoAccess on Centos 6

Install the package from EPEL repository

yum --enablerepo=epel install goaccess

Edit config file for Apache

Uncomment the following lines

vi /etc/goaccess.conf

time-format %H:%M:%S
date-format %d/%b/%Y
log-format %h %^[%d:%t %^] "%r" %s %b "%R" "%u"

Run GoAccess

goaccess -f /var/log/httpd/access_log

Generate HTML report

goaccess -f /var/log/httpd/access_log > /var/www/html/goaccess/index.html

Generate a real-time HTML report

goaccess -f /var/log/httpd/access_log -o /var/www/html/goaccess/index.html --real-time-html --ws-url=<host> &

Interactive menu

  • Main help: F1 or h
  • Redraw main window: F5
  • Quit the program, current window or collapse active module: q
  • Expand selected module or open window: o or ENTER
  • Set selected module to active: 0-9 and Shift + 0
  • Scroll down within expanded module: j
  • Scroll up within expanded module: k
  • Set or change scheme color: c
  • Forward iteration of modules: TAB
  • Backward iteration of modules: SHIFT + TAB
  • Scroll forward one screen within an active module: ^f
  • Scroll backward one screen within an active module: ^b
  • Sort options for active module: s
  • Search across all modules (regex allowed): /
  • Find the position of the next occurrence across all modules: n
  • Move to the first item or top of screen: g
  • Move to the last item or bottom of screen: G

Resources