GoAccess is linux terminal’s real time Apache Log Analyzer and gives you interactive view of Apache access log. It is super fast and provides you real time reporting on the fly.
Currently it support Apache two standard reports 1. Combined Log Format 2. Common Log Format. You can also monitor Nginx log if it is configured with Apache log format.
Here we will compile it on CentOS 6 64bit Server.
Installing dependencies :
yum install glib2 glib2-devel glibc make geoip
Download and Compile GoAccess-v0.4.2 :
How to use GoAccess?
To view access log in interactive mode
goaccess -f /var/log/httpd/access.log
below options can be used before
-b # Enable bandwidth consumptions. -s # Enable HTTP status codes reporting -a # Enable User Agents list by host. -e # This is nice option, if you would like to exclude IP from being counted under HOST section.
Here is complete syntax to use with above options:
goaccess -b -s -e 100.100.XX.XX -a -f /var/log/httpd/access.log