What is GoAccess?
GoAccess is an open source real-time web log analyzer and interactive viewer that runs in a terminal in *nix systems or through your browser. It provides fast and valuable HTTP statistics for system administrators that require a visual server report on the fly.
GoAccess was designed to be a fast, terminal-based log analyzer. Its core idea is to quickly analyze and view web server statistics in real time without needing to use your browser (great if you want to do a quick analysis of your access log via SSH, or if you simply love working in the terminal).
While the terminal output is the default output, it has the capability to generate a complete, self-contained real-time HTML report (great for analytics, monitoring and data visualization), as well as a JSON, and CSV report.
- Fast, real-time, millisecond/second updates, written in C
- Only ncurses as a dependency
- Nearly all web log formats (Apache, Nginx, Amazon S3, Elastic Load Balancing, CloudFront, Caddy, etc)
- Simply set the log format and run it against your log
- Beautiful terminal and bootstrap dashboards (Tailor GoAccess to suit your own color taste/schemes)
- and of course, Valgrind tested.
You can check a demo from: Here
And here is the official web page: Here
How to install GoAccess?
Code language: PHP (php)
# Install needed dependences in Ubuntu 21.04 Linux $ sudo apt install libncursesw5-dev libgeoip-dev libtokyocabinet-dev build-essential # Download and install in Ubuntu 21.04 Linux $ wget https://tar.goaccess.io/goaccess-1.4.6.tar.gz $ tar -xzvf goaccess-1.4.6.tar.gz $ cd goaccess-1.4.6/ $ ./configure --enable-utf8 --enable-geoip=mmdb $ make $ make install # Install GoAcess using apt in Ubuntu 21.04 Linux $ apt-get install goaccess # Install using the official goAccess repository $ echo "deb https://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 # Download and install in Fedora $ yum install goaccess # Download and install in Arch Linux $ pacman -S goaccess # Download and install in Gentoo $ emerge net-analyzer/goaccess # Download and install in FreeBSD $ pkg install sysutils/goaccess # Download and install in OpenBSD $ pkg_add goaccess # Download and install in OpenSUSE $ zypper ar -f obs://server:http http $ zypper in goaccess # Download and install in pkgsrc (NetBSD, Solaris, SmartOS, ...) $ pkgin install goaccess # Download and install in Slackware $ curl https://slackbuilds.org/slackbuilds/14.1/system/goaccess.tar.gz | tar xvz $ cd goaccess/ $ GEOIP=yes ./goaccess.SlackBuild # Build it from github $ git clone https://github.com/allinurl/goaccess.git $ cd goaccess $ autoreconf -fi $ ./configure --enable-utf8 --enable-geoip=mmdb $ make $ make install
How to use GoAccess?
The usage is pretty easy we can use it in the terminal, to generate a static output or use it in real time.
Code language: PHP (php)
# Terminal Output $ sudo goaccess /var/log/apache2/access.log -c # Static HTML Output $ sudo goaccess /var/log/apache2/access.log --log-format=COMBINED -a -o /home/latewebi/public_html/report.html # Real-Time HTML Output $ goaccess /var/log/apache2/access.log -o /var/www/html/report.html --log-format=COMBINED --real-time-html
Are there any alternatives to goAccess?
The simple answer is Yes, there are many other alternatives to goAcces. Here is a little list to check out:
- NAGIOS – Nagios Log Server greatly simplifies the process of searching your log data. Set up alerts to notify you when potential threats arise, or simply query your log data to quickly audit any system.
- Apache Viewer – free and powerful tool which lets you monitor, view and analyze Apache/IIS/nginx logs with more ease. It offers search and filter functionality for the log file, highlighting the various http requests based on their status code. There is also a report facility, thus you can generate a pie/bar chart in seconds. Together with this there are also statistics where you can get the top hits, top errors, number of status codes, total bandwidth and more.
- 10-Strike Log-Analyzer – PAID web analytics software that processes raw log files (NCSA common and extended formats) from your web servers like Apache, and generates many types of reports and diagrams (see the detailed list below).
- AWSTATS – free powerful and featureful tool that generates advanced web, streaming, ftp or mail server statistics, graphically. This log analyzer works as a CGI or from command line and shows you all possible information your log contains, in few graphical web pages. It uses a partial information file to be able to process large log files, often and quickly. It can analyze log files from all major server tools like Apache log files.
- Web Log Expert – fast and powerful access log analyzer. It will give you information about your site’s visitors: activity statistics, accessed files, paths through the site, information about referring pages, search engines, browsers, operating systems, and more.
In this article we installed and reviewed goAcces web log analyzer. If you know other good log analyzers, please tell us in the comments bellow.