开发者

Analyze Previous months data from logs using Awstats?

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 p开发者_StackOverflow中文版revious 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


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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜