Installing/Running GoAccess Visual Web Log Analyzer on Ubuntu

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).

Running new static server for the blog. Was going to host elsewhere but I always require finer controls than most SaaS want to give up.

To look at the logs I'm trying Easy to install but had a couple of tiny issues that I ran in to:

Before you following the Download/Install instructions read the bit that says

may need to install build tools like gcc, autoconf, gettext, autopoint etc for compiling/building software from source. e.g., base-devel, build-essential, "Development Tools".

I did get the following errors

For me, I had to run the following:

$ sudo apt-get install build-essential libmaxminddb-dev libncursesw5-dev

Apart from being a great CLI tool, it also knocks out HTML/PDF reports as well! Just run the following for the latest on your logs.

$ goaccess /var/log/nginx/access.* --log-format=COMBINED -o /var/www/html/goaccess.html

Or if you want something up to date, modify crontab and add:

0 * * * * goaccess /var/log/nginx/access.* --log-format=COMBINED -o /var/www/html/goaccess.html

You can then lock that page down via NGINX

server {
  # ... Other configurations ...

  location = /goaccess.html {
      # Allow access only from specific IP addresses
      allow 012.345.678.910;

      # Deny access from all other IP addresses
      deny all;

  # ... Other configurations ...