GoAccess is very popular free and open source web server log monitoring tool for linux based system.
Log can be viewed in both text-based as well as web application user interface.
GoAccess parse and analyze the log of Apache and Nginx located in /var/log directory and display it in user readable format.
There is multiple format available like CLF (Common Log Format), W3C format (IIS), and Apache virtual hosts, and then generate the output.
Check live demonstration of GUI GoAccess https://rt.goaccess.io/
Table of Contents
GoAccess has following feature
- Display Uniqure visitor per day – (Including web spider)
- Monitor User Reqested files
- Display break URL Not Found (404)
- User Hostname, Ip and Operating System
- Requested user browser
- Pages where spent more time
- User Geo Location
- HTTP Status Code
- Ability to output these data into Json or CSV
Ubuntu do not provide latest verson of the package in there official repository. so, to install the latest versio of GoAccess, you need to manually download and compile it from its source code.
Installation on Debian and Ubuntu
$ sudo apt install libncursesw5-dev libgeoip-dev apt-transport-https $ cd /usr/src $ wget https://tar.goaccess.io/goaccess-1.4.tar.gz $ tar -xzvf goaccess-1.4.tar.gz $ cd goaccess-1.4/ $ sudo ./configure --enable-utf8 --enable-geoip=legacy $ sudo make $ sudo make install
Installation on CentOS, RHEL and Fedora
# yum install ncurses-devel glib2-devel geoip-devel # cd /usr/src # wget https://tar.goaccess.io/goaccess-1.4.tar.gz # tar -xzvf goaccess-1.4.tar.gz # cd goaccess-1.4/ # ./configure --enable-utf8 --enable-geoip=legacy # make # make install
The easiest and most preferred way to install GoAccess on your Linux System is using package manager. But as I mentioned before not all the Linux system have latest version GoAccess in there repo.
Installation on Debian, Ubuntu, and Pop OS
Enter below command in terminal to install.
sudo apt-get install goaccess
Debain offical repository do not provide latest version of GoAccess to install latest version of GoAccess perform below task.
$ echo "deb http://deb.goaccess.io/ $(lsb_release -cs) main" | sudo tee -a /etc/apt/sources.list.d/goaccess.list $ wget -O - https://deb.goaccess.io/gnugpg.key | sudo apt-key --keyring /etc/apt/trusted.gpg.d/goaccess.gpg add - $ sudo apt-get update $ sudo apt-get install goaccess
# yum install goaccess
# pacman -S goaccess
# emerge net-analyzer/goaccess
If you want take taste of GoAccess in windows based system try to use CowAxess which is GoAccess implementation for Window Based System.
How to use GoAccess
To access report of apache or nginx on your system use below command.
# goaccess -f /var/log/httpd/access.log
# goaccess -f /var/log/nginx/access.log
After executing above command it ask to to choose preferred format to show data like below screen.
We prefer to use Common Log Format (CLF) to view log.
Apache Log Overview
Operating System, Browsers, Time Distribution
How to generate GoAccess Apache and Nginx Report?
To generate HTML output of your webserver to share to other people or view graphically use below command.
# goaccess -f /var/log/httpd/access.log > reports.html
# goaccess -f /var/log/nginx/access.log > reports.html
If any query drop us comment
Innovative tech mind with 10 years of experience working as a computer programmer, web developer, and security researcher. Capable of working with a variety of technology and software solutions, and managing databases.