GoAccess is an interactive and real-time web server log analyzing programmer that instantly examine and view web server logs.
It appears as an open-source and works as a command line in Unix/Linux Operating Systems.GoAccess gives brief and helpful HTTP (webserver) statistics report for Linux managers on the fly.
It also takes care of both the Apache and Ngnix web server log forms.
GoAccess analyze the provided web server log formats in named options including CLF (Common Log Format), W3C format (IIS), and Apache virtual hosts. Then it produces an output of the data to the end.
Features of the GoAccess are as follows:
It has General Statistics, Bandwidth, etc.
Provides metrics per Virtual Host
Operating Systems, Browsers, and Spiders.
It gives Geo-Location – Continent/Country/City
Top Visitors, Visitors Time Distribution, Referring Sites & URLs, and 404 or Not Found.
Hosts, Reverse DNS, IP Location.
HTTP Status Codes
Support for HTTP/2 & IPv6
Ability to output JSON and CSV
Incremental log processing and support for large datasets + data resolution
Various Color Schemes
How to install GoAccess in Linux system
Currently, the most recent version of GoAccess v1.4 is not available from default system package containers, so you have to install the newest stable version.
For this, in Linux systems, you need to download and collect it from source code as shown manually:
Install GoAccess from Sources in Linux
------------ Install GoAccess 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 install
------------ Install GoAccess 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
GoAccess installation by using Package Manager
The easiest and preferred way to install GoAccess on Linux using the default package manager of your respective Linux distribution.
Please note that, in the system default repositories, there is no all distributions will have the latest version of GoAccess available.
On RedHat, CentOS, and Fedora
# yum install goaccess
# dnf install goaccess [From Fedora 23+ versions]
On Debian and Ubuntu Systems
GoAccess service is possible since Debian Squeeze 6 and Ubuntu 12.04. To install GoAccess, run the below command on the terminal.
$ sudo apt-get install goaccess
Please note that the above command will not forever give you the latest version. Add the official GoAccess Debian & Ubuntu repository for acquiring the recent stable version of GoAccess as shown below:
$ echo "deb http://deb.goaccess.io/ $(lsb_release -cs) main" | sudo tee -a /etc/apt/sources.list.d/goaccess.list
$ wget -O - http://deb.goaccess.io/gnugpg.key | sudo apt-key add -
$ sudo apt-get update
$ sudo apt-get install goaccess
How to use GoAccess?
When completed the installation of GoAccess on your Linux machine, you can use it by running the below command. It will first ask you to determine the log format of your access log.
It is the simplest way to get any web server statistics to use the flag ‘f‘ with the input log file name, as shown following. It will provide you with general statistics of your web server logs.
# goaccess -f /var/log/httpd/softech.com
# goaccess -f /var/log/nginx/softech.com
The above command gives you a complete report of web server metrics by showing summaries of various information as panels on one scrollable view as shown.
Apache Logs Overview
Apache Logs by Operating System – Overview
Apache Logs by Visitor Bandwidth – Overview
Apache Logs by Web Browser – Overview
How to generate the Apache HTML report?
To produce an HTML report of your Apache web server logs, run it upon your weblog file.
# goaccess -f /var/log/httpd/access_log > reports.html