GoAccess Visualizes Access. Log Log

Time:2019-10-8

1. Installing GoAccess tools can be used directly

apt-get install goaccess

2. Use the goaccess command to generate HTML files from logs

Goaccess log path-o path to output HTML--real-time-html--time-format="%H:%M:%S"--date-format="%d/%b/%Y"--log-format=COMBINED

Real-time-html represents real-time display log content

–time-format

– date-format

Log-format for specifying log string format

After the command is executed, a websocket service is opened to update the log data in real time.

3. Build a web service for the generated HTML file, such as configuring a service using nginx

server {
                listen       8080;
                server_name  localhost;
                access_log logs/proxy.access.log proxy;
                location /report.html{
                        alias /home/wwwroot/goaccess/report.html;
                }

        }  

Then visit http://ip:8080 as shown below.

So far, the graphical completion of log data, more ways to use, please visit the official website

GoAccess Chinese net