Install GoAccess in centos to analyze nginx logs

Source: Internet
Author: User
Tags response code centos

If you are using centos, use yum:

Yum install goaccess

If your yum cannot 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

GoAccess can also generate reports in HTML format:

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

I recorded this point, and the other ones are better.

Usage


The basic syntax of GoAccess is as follows:

Goaccess [-B] [-s] [-e IP_ADDRESS] [-a] <-f log_file>

Parameter description:

-F-log file name
-B-enable traffic statistics. This parameter is not recommended if you want to accelerate the analysis speed.
-S-enable HTTP response code statistics
-A-enable user agent statistics
-E-enable specified IP address statistics. Disabled by default.
 
Usage example:

The simplest and most commonly used command is to directly call the goaccess command without any other parameters that affect efficiency.

Goaccess-f access. log

 


To view other information, add the following parameters to display HTTP response code, user proxy, and traffic consumption.

Goaccess-f access. log-s-a-B

Ps:

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

# Yum groupinstall 'development tool'
# 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

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.