[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Apache2 VHosts and AWStats within a clustered environment?



On Thu, Jun 26, 2008 at 03:21:08PM +0100, Matthew Macdonald-Wallace wrote:

[...]

> Our concern is that as we have individual log files for each VHost on
> each individual webserver, the AWStats information cannot be guaranteed
> to be accurate.
> 
> One of the options that we have discussed is logging all the vhost's
> log files to a central log server via NFS (in order to keep the log
> format) and then have each AWStats instance on each server read the
> logs from the central NFS share when it comes to update the graphs
> etc.  The Issue I have found is that a number of people (include Tony
> Mobily in the "Hardening Apache" book) appear to recommend against this.

Ouch. Yes, not something I'd do.

> The other option that we have spoken about is copying all the log files
> to a central server each day, merging them into a single file, sorting
> the file and then running AWStats against that file before copying all
> the graphs etc back to the webServers.  I can see two distinct
> disadvantages to this:
> 
> 1) There will be a huge amount of network traffic as the logs are
> shuttled back and forth between the servers

are you aware of logresolvemerge? 
    http://awstats.sourceforge.net/docs/awstats_tools.html#logresolvemerge
it's quite useful for this sort of thing, ime.

Another way might be to rotate off the logfiles hourly, or something, 
and rsync those over (to a central repo), merge, and analyse; that's 
still a bit messy, imo.

> 2) If AWStats is updated from the browser interface, it will only be
> updated on the server that holds the current connection

Disable that "feature", and update, say hourly via cron.


Reply to: