Use goaccess to visualize access log nginx / apache

In case you need to analyze access log to search for information such as statistic status code server returns, geographic origin statistics of users, statistics which top dynamic files are most requested, top static file statistics Which requests are most … Those query results will give you the basis to make the necessary adjustments such as caching multiple files requested, creating cache servers in geographical areas with multiple requests, determining server status via status codes. If there are too many 5xx or 4xx responses, there should be a problem.

If before, you would have to combine different query commands to extract information from the log access file. Usually, this command is quite complicated, and sometimes I don't even know if it is correct ? Goaccess will solve this problem for you.

Installing goaccess is very simple:

I get the access log template in document logstash:

Try a sample request:

Based on goaccess's man page:

I will configure log-format to match the request form.

Configure /usr/local/etc/goaccess.conf

Then run:


Screen Shot 2016-08-02 at 10.17.10 AM

Or can be viewed in dashboard form:

Screen Shot 2016-08-02 at 10.17.36 AM

Some minor tricks in using goaccess can be found at the end of this article:

ITZone via kipalog

Share the news now