How to generate stats for IIS log files using Webalizer

While sorting through some of my many backups of old machines I came across a whole load of IIS log files for an old site of mine so I thought I'd process them and generate some statistics. I've used Webalizer quite a few times before for generating stats on Apache log files and as v2.01 is available via Synaptic Package Manager in Ubuntu I thought I'd use this.

Unfortunately v2.01 doesn't support support the W3C format that IIS uses, looks like it does now in v2.20 though. However IIS includes a utility called 'convlog' for converting it's logs files to the NCSA common log file format that Webalizer does support. So I fired up my old Windows XP box, installed IIS and used the following command to convert the log files:

convlog -ie ex*.log

Once that had processed all the log files (by default it creates a copy of each log file) I copied them back to my Ubuntu laptop and used 'cat' to combine all the files into one big log file:

cat ex*.nsca > master.log

All that was left to do was create a config file to tell Webalizer what it should do, so I copied the default config file and customised the options to my needs. Then ran 'webalizer' using the customised config file:

./webalizer -c master.conf

Once it's performed it's magic you should have a bunch of detailed reports in the location you specified in the config file!