Install the real-time website log analysis tool GoAccess on CentOS

Source: Internet
Author: User
GoAccess is an open-source real-time website log analysis tool. GoAccess is easy to understand, that is, to read and parse the access log file accesslog of Apache/Nginx/Lighttpd, and then display the statistics in a more friendly way. Statistics include: Access Overview, dynamic page requests, static page requests (slice, style sheet, script, etc.), visitor ranking, guest operating system, guest browser, lailu domain name, error 404, search crawling GoAccess is an open-source real-time website log analysis tool. GoAccess is easy to understand, that is, to read and parse the access log file of Apache/Nginx/Lighttpd, and then display the statistics in a more friendly way. Statistics include: Access Overview, dynamic page requests, static page requests (slice, style sheet, script, etc.), visitor ranking, guest operating system, guest browser, lailu domain name, 404 error, search crawler, search keyword, and so on.

GoAccess has good performance. according to official tests, the speed of processing log files on an Intel Xeon CPU @ 2.40 ghz CPU with 2 GB memory is 97000 lines per second.

The GoAccess provided by Linux is generally too old. for example, Ubuntu 12.04 is 0.4.2, Ubuntu 13.10 is 0.5, and the latest goaccess version is 0.7.1. so similar to the less commonly used software, the Linux release has little official attention, in order to use the latest version, it is best to use the source code installation method.

Install and compile the required tools and libraries for GoAccess on CentOS 6.5:

# yum groupinstall 'Development Tools'# yum install glib2 glib2-devel ncurses-devel

Install and compile the required tools and libraries for GoAccess on Ubuntu 12.04:

$ sudo apt-get install build-essential$ sudo apt-get install libglib2.0-dev libncursesw5-dev

Download the source code, compilation, and installation of GoAccess:

$ wget http://downloads.sourceforge.net/project/goaccess/0.7.1/goaccess-0.7.1.tar.gz$ tar -xzvf goaccess-0.7.1.tar.gz$ cd goaccess-0.7.1/$ ./configure --enable-utf8$ make$ sudo make install

Run GoAccess and select NCSA Combined Log Format:

$ /usr/local/bin/goaccess -f /var/log/apache2/access.log                  +--------------------------------------------------+                  | Log Format Configuration                         |                  | [SPACE] to toggle - [ENTER] to proceed           |                  |                                                  |                  | [ ] Common Log Format (CLF)                      |                  | [ ] Common Log Format (CLF) with Virtual Host    |                  | [x] NCSA Combined Log Format                     |                  | [ ] NCSA Combined Log Format with Virtual Host   |                  | [ ] W3C                                          |                  | [ ] CloudFront (Download Distribution)           |                  |                                                  |                  | Log Format - [c] to add/edit format              |                  | %h %^[%d:%^] "%r" %s %b "%R" "%u"                |                  |                                                  |                  | Date Format - [d] to add/edit format             |                  | %d/%b/%Y                                         |                  +--------------------------------------------------+

The interface is as follows:

 






























GoAccess can also generate reports in HTML format:

$ /usr/local/bin/goaccess -f /var/log/apache2/access.log -a > report.html

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.