GoAccess is a free real-time web log analyzer and interactive viewer that runs in a terminal on Linux or BSD distribution. It provides fast and valuable HTTP statistics for system administrators that require a visual server report on the fly. It parses the specified web log file and outputs the data to the terminal. You can find more information on GoAccess website.
Install GoAccess
First you will have to install the needed dependencies based on your Linux distribution:
For Debian/Ubuntu Linux distribution you will have to run the following commands:
# apt-get install libncursesw5-dev libglib2.0-dev libgeoip-dev libtokyocabinet-dev
For Fedora/RedHat/CentOS Linux distribution you can install them like this:
# yum install ncurses-devel glib2-devel geoip-devel tokyocabinet-devel
Next you can go to GoAccess Download website to get the latest version and download it using wget. After that you just need to decompress it and install it using the usual: ./configure, make and make install, like this:
# wget http://tar.goaccess.io/goaccess-0.8.3.tar.gz
# tar zxvf goaccess-0.8.3.tar.gz
# cd goaccess-0.8.3/
# ./configure --enable-geoip --enable-utf8
# make
# make install
Image may be NSFW.
Clik here to view.
How to Use GoAccess
To use GoAccess you will have to use the command with the -f option pointing to the log file like this:
# goaccess -f /var/log/apache/access.log
And it will open a window that will ask you to select the format of the log file, move with the arrow keys to select a log format, press space to select it, and enter to start processing the file.
Image may be NSFW.
Clik here to view.
Next it will display the interactive interface, where you can use the following keys to navigate the reports:
q - Quit the program, current window or collapse active module
ENTER - Expand selected module or open window
0-9 and Shift + 0 - Set selected module to active
j - Scroll down within expanded module
k - Scroll up within expanded module
TAB - Iterate modules
/ - Search across all modules (regex allowed)
F1 - help
Image may be NSFW.
Clik here to view.
Each report is pretty self-explanatory, you have unique visitors count, requested pages, 404 not found errors, hosts, OSs, browsers and location the visitors have, referrals from other sites or search engines. The main idea behind GoAccess is being able to quickly analyze and view web server statistics in real time, so it provides a fast way too look at those different statistics.
You could also generate a HTML report if you wish so using the following command:
# goaccess -f access.log -a > report.html
GoAccess is a nice utility to have around for when you need a fast view on what is currently happening, it does not provide a lot of details like AWStats, but it's fast and easy to setup and use.
The post GoAccess - A Real Time Apache Web Access Log Analyzer appeared first on LinOxide.