Goaccess:nginx Log Analysis Tool

Source: Internet
Author: User
Tags web services

The interview will be Beimian to the problem is: give the Web server access log, please write a script to statistics access to the top 10 IP? What are the top 10 requests for access? When you get to know the goaccess, you'll understand that the only thing that can be done is to put a or C in addition to the ability to memorize your scripts.

For nginx log analysis, there are many tools, measuring the standard of good or bad is probably three fast: Install fast, parse fast, start fast. Meeting these three points of goaccess is indeed the home of the necessary medicine.

In fact, the title is a bit wronged goaccess, it is a log analysis tool, not just for nginx use. You can also use it to analyze Apache,iis logs, or even Web services you write yourself, assuming that you need to define a good log format for parsing. If you see a beautiful woman, you will look like a few of its functions are:

1 parsing speed is fast

2 Easy to use

3 can generate Html,json,csv installation goaccess

If you are CentOS, use Yum:

Yum Install goaccess

If your yum can't find goaccess, install Epel first.

wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm wget http://rpms.famillecollet.com /enterprise/remi-release-6.rpm sudo rpm-uvh remi-release-6*.rpm epel-release-6*.rpm

There are two ways to use goaccess, one that is displayed and manipulated directly on the console.

When you want to immediately analyze the IP access situation at 10 to 12 this morning, it's fastest to hit the console directly.

Another is to generate HTML files or data files.

If you want to manage the server cluster every day to send you a visit to the log yesterday, this is not the second choice.

Console uses goaccess

Parameters for Goaccess:

-F <input-file>: Log files that need to be resolved

-A--agent-list: In the host module is not able to click IP to appear this IP user-agentlist, is to appear as a function of the diagram

-C--conf-dialog: whether to display the log and Format Configuration dialog window.

This is the window below.

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.