2

I'm using goaccess on Ubuntu Server 12.04 to view my analytics on my web server. I just run the following utility:

goaccess -f /var/log/nginx/access.log

However I'm only seeing one days worth of data. I was wondering if there are some default setting within nginx to manage this? I've read a little about log file rotation but that really isn't a problem for me at the moment. It appears something is keeping the access.log from showing more than a day.

Can't seem find anything in the nginx documentation to play with some settings.

Kayla
  • 171
  • 1
  • 8
calabi
  • 58
  • 4

3 Answers3

1

You can also run it as:

zcat -f access.log* | goaccess

to avoid creating a new file.

Kayla
  • 171
  • 1
  • 8
  • Full comand for me was `sudo zcat -f /var/log/nginx/access.log* | goaccess --log-format=COMBINED --ignore-crawlers` – Harley Jul 23 '19 at 23:06
0

The issue was log file rotation as @german_guy pointed out. To get all the output I copied all the access.log* files out and into another directory then un-compressed merged them together using:

gunzip access.log*
cat access.log* > new.file

Which I then ran with goaccess

goaccess -f ~/new.file

Now I get all the analytics data.

calabi
  • 58
  • 4
0

Another option if you are using Nginx would be to use their free monitoring tool nginx amplify. This is simple to setup and allows a good deal of customisation by metric and time period and has the advantage that you don't need to keep manually running commands as it's browser based once installed.