Analyzing your access logs can provide crucial insight into how your application is performing and how your audience is interacting with your content. In this article we’ll cover how to use the open source tool, GoAccess, to help you visualize your access log data so you can gain deeper insights into your application.
You need to have the Log Shipping tool enabled on your VIP Go site and have your logs downloaded to your computer.
To install GoAccess, go to their download page where you will find specific instructions for your operating system.
For macOS we recommend using homebrew:
brew install goaccess
For Windows, you have the choice between a specific Windows implementation called CowAxess which provides an installer file or using the Windows Subsystem for Linux and following the Linux installation steps.
Once GoAccess is installed, you will need to configure it to parse the VIP Go logs.
The GoAccess configuration file will be either
%sysdir% is one of
Open that file, and add the following formatting options:
# Set time format time-format %H:%M:%S # Set date format date-format %Y-%m-%e # Set log format log-format %^:"%^"%^:"%U"%^:"%^"%^:"%m"%^:"%K"%^:"%u"%^:"%^"%^:"%h"%^:"%v"%^:"%^"%^:"%^"%^:"%^",%^:"%R",%^:"%^"%^:"%^"%^:"%dT%t+%^"%^:"%^"%^:"%C"%^:"%^"%^:"%^"%^:"%^"%^:"%M"%^:"%^"%^:"%T"%^:"%b"%^:"%s"
Create a Report with GoAccess
To view a report in your terminal, you can use the following command:
goaccess 17_50_0 17_55_0 18_00_0 18_05_0 18_10_0
The command above is simply calling
goaccess and then passing it a number of access logs, like
17_50_0, separating them by a space.
If you want to create an HTML report, you can run the following command in your terminal:
goaccess 17_50_0 17_55_0 18_00_0 18_05_0 18_10_0 > logreport.html
Opening up the
logreport.html file will display your log information in a nice set of graphs: