GoAccess is an interactive and real time web server log analyzer program that quickly analyze and view web server logs. It comes as an open source and runs as a command line in Unix/Linux operating systems. It provides brief and beneficial HTTP (web server) statistics report for Linux administrators on the fly. It also take care of both the Apache and Ngnix web server log formats.
GoAccess parses and analyze the given web server log formats such CLF (Common Log Format), W3C format (IIS) and Apache virtual hosts and then generate output of the data to the terminal. It includes the following features.
General Statistics, bandwidth etc. Top Visitors Requested files Requested static files, images, swf, js, etc. Referrers URLs 404 or Not Found Operating Systems Browsers and Spiders Hosts, Reverse DNS, IP Location HTTP Status Codes Referring Sites Keyphrases Support for IPv6 Different Color Schemes Unlimited log file size Custom log format
How Do I Install GoAccess?
Presently, GoAccess is not available from yum repositories, so we need to manually download and compile it using source code under redhat based systems.
# yum install ncurses-devel glib2-devel GeoIP* # cd /usr/src # wget http://sourceforge.net/projects/goaccess/files/0.5/goaccess-0.5.tar.gz/download # tar zxvf goaccess-0.5.tar.gz # cd goaccess-0.5 # ./configure # make; make install
GoAccess utility is available since Debian Squeeze 6. To install just run the following command on the terminal.
# apt-get install goaccess
For older Debian releases, you can be able to install it by adding a line to your /etc/apt/sources.list file as shown below.
# vim /etc/apt/sources.list # deb http://ftp.de.debian.org/debian sid main # apt-get update # apt-get install goaccess
Since Ubuntu 11.04 it is available from the apt-get repositories. So, you can simple type the following command on the terminal to install it.
# apt-get install goaccess
For older Ubuntu releases, simple add the following line to your /etc/apt/sources.list file and then run the commands to install it as shown below.
# vim /etc/apt/sources.list # deb http://ubuntu.mirror.cambrium.nl/ubuntu/ natty main universe # apt-get update # apt-get install goaccess
How Do I Use GoAccess?
Once, goaccess is installed, execute ‘goaccess‘ command without any arguments will list the help menu.
GoAccess - 0.5 Usage: goaccess [ -e IP_ADDRESS][ - a ][ - c ]< -f log_file > The following options can also be supplied to the command: -f <argument> - Path to input log file. -c - Prompt log/date configuration window. -a - Enable a List of User-Agents by host. For faster parsing, don't enable this flag. -e <argument> - Exclude an IP from being counted under the HOST module. Disabled by default. Examples can be found by running `man goaccess`. For more details visit: http://goaccess.prosoftcorp.com GoAccess Copyright (C) 2009-2012 GNU GPL'd, by Gerardo Orellana
The easiest way to get the any web server statistics use the flag ‘f‘ with input log file name as shown below. The below command will give you general statistics of your web server logs.
# goaccess -f /var/log/httpd/tecmint.com # goaccess -f /var/log/nginx/tecmint.com
For more information and usage please visit http://goaccess.prosoftcorp.com/.