Analog Webalizer and Awstats


Analog has been my web log analyzer for as long as I can remember. There are several reasons, first and foremost being that it was the best around many many years ago, and once you find a good tool you stick with it. I have stuck with it for a long time.

That does not mean I have been faithful, I have looked at webalizer and awstats on a couple of occasions. Just a little while ago, I tried webalizer using the version that was on my Fedora Core 3 CD. Unfortunately webalizer does not allow you to specify the log file format. It wants you the change the log format in your webserver configuration. This is a big nono if you have CD loads of logs in a particular format. So naturally it's time for rpm -e webalizer-2.01_10-25.i386

The last version of Awstats that was installed on this computer was 5.9.1 which was painfully slow. That is only to be expected it is written in perl after all while webalizer and analog are created with C. Slowness wasnt' the only problem, it took considerable effort to persuade it to accept my log format, and awstats wasn't impressed by the fact that the log files were gzipped.

Though under normal circumstances, I download development versions instead of stable versions, now I decided to get 6.4 version of Awstats instead of the 6.5 branch. That is because the 6.5 branch does not yet include an RPM, last time around installing from source was very painful affair and that mistake wasn't going to be repeated this time around.

Even installing from RPM is not as simple as it sounds, there are three additional steps to follow, so let's digress for a moment. I am occaisionally look out for alternatives for analog because though it is fast and accurate it has one shortcoming. It will not give you monthly stats on a page by page basis. The manual is rather cryptic (the other manual are really no better) and updates are infrequent.

Configuring awstats is quite easy unless you have a custom log format, then it becomes a bit more challenging but the same can be said about analog. The next challenge is to get the analyzer to read your files in chronological order. The tools is your friend.

Now that you have put up with this tirade, let me give you something usefull. here is a sample from my log file: - - [16/Mar/2005:16:04:11 -0800] "GET /robots.txt HTTP/1.0" 404 272 "-" "Mozilla/5.0 (compatible; Yahoo! Slurp;"

This is pretty much a standard log format except for the fact that the virtual hostname is appended to the end of the record. Now here is the analog config directive:

LOGFORMAT (%S %j %u [%d/%M/%Y:%h:%n:%j] "%j %r %j" %c %b "%f" "%B" %jn)

And here is the webalizer directive:

Does the line look blank? yes it is blank, as I already mentioned above you cannot change the format, now here is the awstats version:

LOGFORMAT (%S %j %u [%d/%M/%Y:%h:%n:%j] "%j %r %j" %c %b "%f" "%B" %jn)

Finally please ignore the fact that this entry is long, very long, probably the longest entry for this blog. Awstats takes a very very very long time to run.

comments powered by Disqus