Logalize
2010-12-11
Introduction
Logalize is a Perl script that analyses Apache logfiles (in combined format) and presents some statistics. The statistics are rendered as bar graphs in pure XHTML and CSS, viewable with any web browser. The statistics are generated from the logfile each time the script is run.
Motivation
As my website started to expand and I started to receive emails from people about things on my website, I grew curious about how many people were visiting my site, where they came from, and what things they were interested in. I started looking around for software that could analyze my logfiles and present the relevant data in a catchy way. I had a strong preference for scripts over compiled programs, for reasons of portability and security. I figured that Perl and PHP were excellently suited to the task, and went looking for scripts in either of those languages. I ended my search feeling disappointed.
Features
Logalize analyzes your webserver log (in NCSA combined format) to generate the following statistics:
- Total number of hits
- Hits by IP address (who's visiting your site)
- Hits by URI (what pages are they viewing)
- Hits by Referrer (where do visitors come from)
- Hits by keyword (what are they looking for)
Hits by IP, URI, Referrer and keyword are presented in bar graphs. To avoid screen clutter, only entries that account for 10% or more of the highest number in the category are displayed (e.g. if the highest hit count from one IP is 1600, only IP addresses that provided at least 160 hits will be represented). This will be configurable in a future version.
For an sample of what Logalize outputs, you can look at the statistics for my website.
Known Issues
The presentation of the statistics can and probably will be improved.
Download and Installation
Logalize is currently in experimental stage, but you can already download the code if you are interested.
- logalize-0.5.0.tar.bz2 (3.4 KB)
To actually use Logalize, extract the tarball to a web-accessible directory and edit the configuration file. Since the code is still fairly small, it should all be fairly straigtforward. If you still run into problems, please do not hesitate to contact me. Patches and suggestions are welcome.