Webalizer Configuration

Webalizer is a software package which will analyze web server logs and produce readable, colorful reports on site usage, referers and other useful things. See http://www.webalizer.org for details and to download the code.

Viewing Reports

When webalizer was first installed on www18 it was set up at http://www18.i2u2.org/apache-usage , and this will continue to work until the branches/1.1 rollout. You need a username/password to access this resource (ask Mihael or Bob).

Eric has built webalizer from source and configured it to use http://www18.i2u2.org/ops/usage (and similar on the other nodes). It is an item in the control panel you find under /ops on each machine. Access is restricted to authenticated users (forum account) who have the "administrator" role.

Both are running on www18, but we will switch over to just the new one when we rollout to branches/1.1

Configuration File

The original webalizer on www18 did not use a configuration file, so it just used all the defaults. The new webalizer uses the file webalizer.conf which is in /usr/local/etc. The comments there are copious, so it should be easy to modify the configuration even if you are not an expert.

History and cache files are in /var/lib/webalizer. This needs to be writeable by the process which runs Webalizer.

Log Rotation

Log files can get to be very long, so it is considered good practice to "rotate" the logs, by moving the current file out of the way (saving it, at least for a while) and creating a new empty file. This is easily done on our systems using the logrorate program, which is run nightly by cron, and uses the configuration files found in /etc/logrotate.d. The format is straightforward, and there is a man page.

Webalizer has been set to do "incremental" processing, which means that it remembers where it left off in the logs. That way it only has to process the current log file, not any back logs that come from rotation.

There is a potential to loose data if we rotate the logs first, then run webalizer. If web logs are rotated weekly or monthly but webalizer is run daily then the loss would be small -- just the last day of data -- but there would still be loss. To insure that this does not happen, webalizer must be run before logrotate. Since cron runs tasks in /etc/cron.daily in lexical order this would not normallyl be the case, since 'w' comes after 'l'. To correct this, be sure that the webalizer and logrotate entries begin with an ordering prefix (eg. 20-webalizer and zz-logrotate) as is done in /etc/rc?.d for init scripts.

Dump Files

Dumps will be put in boinc/html/ops/usage/dumps. These are tab-separated files which can be imported into a spreadsheet program or put to some other use.

-- Main.EricMyers - 26 Mar 2009
Topic revision: r5 - 2013-08-07, forero
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback