Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I get AWstats to analyze old log files?

Tags:

awstats

I have many old log files (apache) and they span 3 different VPS servers I've had so there are different sets with the same name:

old vps 1 (jan. 2012 - mar. 2012) -> access.log.1.gz

old vps 2 (apr. 2012 - oct. 2012) -> access.log.1.gz

etc..

Is there an awstats command that will analyze ALL of the old log files and generate the reports with the correct dates? And do I need to gunzip the files or rename them before I can run the command?

like image 991
Zachary Uram Avatar asked Dec 12 '12 04:12

Zachary Uram


People also ask

Where does AWStats store data?

AWStats statistics database files are saved in directory defined by the DirData parameter in configuration file. With data in log file "/pathtoyourlog/yourlog.

What is AWStats folder?

AWStats shows you the number of visits, visits duration, last visits, unique visitors and their country, OS/Browser type, most viewed pages, search engine and used keywords used to find your site etc.


1 Answers

You can use the logresolvemerge.pl tool (see FAQ-COM350). Either you change the LogFile Option in the .conf file, or (for a one-time run) use it as argument in an update.

LogFile="/path/to/logresolvemerge.pl access.log* |" 

An example (on a debian based system) for a command line update:

/usr/lib/cgi-bin/awstats.pl -update -config="example.com" -LogFile="/usr/share/awstats/tools/logresolvemerge.pl /var/log/apache2/access.log* |" 

Remark: It is possible, that you need to clean the existing statistic-data. See FAQ-COM500.

like image 108
redimp Avatar answered Sep 29 '22 07:09

redimp