1

Hi I have configured Awstats on my ubuntu machine to analyze nginx access logs and the problem is Awstats gives me report only for the present day i want to analyze the previous months logs also and i have combine all logs to a single file and ran the update script still i dnt get the report for the previous months, i checked the log files the data for the previous months are in avilable what am i doing wrong

Rakesh
  • 81,458
  • 17
  • 76
  • 113

2 Answers2

4

You can use a real-time log analyzer, such as GoAccess. It's really fast and you can combine all logs. apache & nginx

http://goaccess.prosoftcorp.com/

zcat -f access.log* | goaccess -a -s -b

OR

zcat access.log.*.gz | goaccess -a -s -b
1

What worked for me was to use logresolvemerge.pl to create a new logfile. I then deleted all the previous logs and used the one really big large as the access.log. I then set it to the appropriate permissions. Then I deleted the domain.hash file that stored all the awstats data. You can find it by first looking in the /etc/awstats/awstats.yourdomain.conf file. It has a location for DirData. Mine was /var/lib/awstats. After deleting that hash file, I reran the update command and it took forever. Once it was done, I reloaded apache2 and I had all my data from the last year and a half. You might not need to reload Apache but I didn't test it before I did.

greeness
  • 15,956
  • 5
  • 50
  • 80
DeekJX
  • 11
  • 1