Building a simple real-time log analysis system using Goaccess

Source: Internet
Author: User
Tags geoip install go

Early Know nginx log analysis tool goaccess, but before because only static analysis, feel not too strong. Recently found it is able to display reports in real time and the report is much more powerful than before to do trend analysis. So be decisive to download the installation. The following is a CentOS-based installation configuration step.


1, installation GeoIP
sudo yum install GeoIP geoip-devel

2. Installation
Centos:yum Install go Access
or source Installation
$ wget http://tar.goaccess.io/goaccess-1.1.1.tar.gz $ TAR-XZVF goaccess-1.1.1.tar.gz $ cd GOACCESS-1.1.1/$./configure- -enable-geoip--enable-utf8 $ make # make install

3. Configuration time and log format
sudo vim/usr/local/etc/goaccess.conf
Remove comments from the following items
1. Apache/nginx Time Format Time-format%h:%m:%s
2. Apache/nginx Date format Date-format%d/%b/%y
3. NCSA comobined log format Log-format%h%^[%d:%t%^] "%r"%s%b "%r" "%u"

4. Run the following command for real-time analysis
Goaccess-f/home/wwwlogs/access.log-o <output_path>/state.html--real-time-html--date-spec=hr--hour-spec= Min--ws-url=www.cbcye.com

Effect Preview

Building a simple real-time log analysis system using Goaccess

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.