Regenerate AWstats when using log rotation

Somewhere last week I configured AWstats for our
Connections environment to figure out what the usage is and to see
what ourĀ  busiest usage period is.

Because we use cronolog to rotate our access.log file on our IHS
server, every day get it’s own directory and access.log.

No problem with AWstats, you can configure it like this.

FILE ./awstats.connectons.company.com
LogFile=”/data/alogs/connections.company.com/access.log/%YYYY-0/%MM-0/%DD-0/access.log”
!FILE

But after running it for a few days I say one host owning the host top 10
list with more then 65000 page requests in only a couple of days.
After a #dig -x 123.123.123.123 I found that this was a Notes Domino
server equipped with an agent that collected the RSS feeds of
Blogs and Activities 24/7.

By configuring the SkipHosts= option in de config file of AWstats for
our Connections environment I could ignore requests coming from
this Domino server forĀ  the upcoming stats collections.

But to get a good picture of the usage of Connections in the pas days I
searched how I got rebuild the AWstats database to completely ignore
the mentioned Domino server in all stats.

Because we use log rotation for our access logs I could not simple delete
the database as built by awstats. Only deleting the database and a
rerun of the awstats.pl script just gave me the stats of the current day.

Solution, #cat all the access logs of the different days to one and
configure this log file for an one-time run in your awstats
configuration file, et voila.

This entry was posted in Tools and tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

Please leave these two fields as-is:

Protected by Invisible Defender. Showed 403 to 807,320 bad guys.