Linux system administrators find command line monitoring more friendly and useful. Web servers are the heart of internet fetching millions of web pages to the visitors. Administrators would be eager in monitoring their web servers and tune their websites for better performance. GoAccess a command line tool would quickly analyze and view your web server statistics in real time without having to generate an HTML report. It provides fast and valuable HTTP statistics for system administrators that require a visual server report on the fly. GoAccess parses the specified web log file and outputs the data to the terminal although, it is possible to generate an HTML report.
GoAccess Features :
- General Statistics, bandwidth etc.
- Time taken to serve the request (useful to track pages that are slowing down your site)
- Top Visitors
- Requested files
- Requested static files, images, swf, js, etc.
- Referrers URLs
- 404 or Not Found
- Operating Systems
- Browsers and Spiders
- Hosts, Reverse DNS, IP Location
- HTTP Status Codes
- Referring Sites
- Keyphrases
- Support for IPv6
- Different Color Schemes
- Unlimited log file size
- Output statistics to a file. See report.
- Custom log format
Supports all web log formats…
GoAccess allows any custom log format string. Predefined options include, but not limited to:
- Common Log Format (CLF) Apache
- Combined Log Format (XLF/ELF) Apache
- W3C format (IIS).
- Amazon CloudFront (Download Distribution).
- Apache virtual hosts
How fast is GoAccess when parsing a log file and report in Real Time ?
Many factors influence for the parsing time, including processor, ram, log, etc. However, generally GoAccess has given the below performance on an Intel Xeon CPU @ 2.40ghz machine having 2GB Ram :
- Benchmark with full features enabled (v0.6) – 95,000 lines per second !
GoAccess Installation :
Requirements :
- ncurses
- GLib >= 2.0.0
- GeoIP (optional) for geolocation data
Installation of packages using YUM :
YUM is the best way to install any package as it takes care of the dependency packages installation. You can follow our guide to configure YUM on any CentOS/RHEL/Fedora machines. You can also follow YUM usage for searching, installing, updating packages and for other YUM operations.
On CentOS :
Tue Dec 03 ~># yum install goaccess
This will list and upon accepting installs all the required packages, if not installed as shown in the image below :
From the above image you can deduce that, required packages ncurses and Glib2 were already installed and further GeoIP dependency package will be installed along with GoAccess. You can also note that the GoAccess version (0.6-1) is the latest version !
On Debian/Ubuntu :
# apt-get install goaccess
On Arch Linux :
# pacman -S goaccess
Installation of packages from source :
First download the latest stable version of GoAccess and then extract and compile GoAccess as shown below :
$ wget http://downloads.sourceforge.net/project/goaccess/0.6.1/goaccess-0.6.1.tar.gz $ tar -xzvf goaccess-0.6.1.tar.gz $ cd goaccess-0.6.1/ $ ./configure --enable-geoip --enable-utf8 $ make # make install
Build from GitHub (Development) :
$ git clone https://github.com/allinurl/goaccess.git $ cd goaccess $ autoreconf -fi $ ./configure --enable-geoip --enable-utf8 $ make # make install
How to use GoAccess :
It’s fairly easy to run GoAccesss, once it has been installed (no configuration is needed). Just run it against your web access log file: (-a is optional) and below image shows the General GoAccess Dashboard. The main dashboard is composed of 11 modules. It is scrollable, searchable and each module can be sorted. All modules within the main dashboard are scrollable and can be expanded for detailed information.
# goaccess -f /etc/httpd/logs/access.log -a
Note: The above image shows not a promising numbers as the logging was disabled on our web server to reduce the system load !
How to generate HTML report using GoAccess :
To generate an HTML report, just run it against your web log file: (-a is optional)
# goaccess -f /var/log/apache2/access.log -a > report.html
Go start using GoAccess and monitor your web server on a Real Time !!!