[wplug] problem with apache log files and awstat

David J. Pryke david-wplug at pryke.us
Mon Nov 17 14:44:24 EST 2008


Zach Uram wrote:
> Running apache2 on Debian testing. I use awstat to generate statistics
> from my /var/log/apache2/access.log
> but logrotate keeps archiving it so I have
> /var/log/apache2/access.1.gz,  /var/log/apache2/access.2.gz etc.
> 
> How can I have awstat run once per month and generate the statistics
> based on *all* the log files?
> 
> Zach
> 
Look at logresolvemerge.pl:
http://awstats.sourceforge.net/docs/awstats_tools.html
"Files can be .gz/.bz2 files if zcat/bzcat tools are available in PATH. "

And also look at:
http://awstats.sourceforge.net/docs/awstats_config.html#LogFile
# You can also use a pipe if log file come from a pipe.
# Example: "gzip -d </var/log/apache/access.log.gz |"
# If there is several log files from load balancing servers :
# Example: "/pathtotools/logresolvemerge.pl *.log |"

So, using logresolvemerge.pl, you should be able to combine the gzipped logs 
into a single logfile "on the fly" while AWStats parses the output.

-- 
Thanks,

David J. Pryke


More information about the wplug mailing list