Wednesday, January 31, 2007

Analyzing IIS logs ...

Well...since we are talking about logs, lets talk abt how to analyze the IIS logs...\


If your IIS is even half as busy as mine, you must wanna know whats cooking on the server...

Here is how you can analyze the logs for IIS

Report Generation for the live server

1. The applications used for log analysis are the freewares, Analog and Reportmagic. The softwares are stored in the “install” directory of the IAI machines.

2. *:\Apps\Website Statistics is the directory where the softwares were installed by me. After the install (which is basically unzipping of the files), modify the following files.
a. analog.cfg – this is the configuration file for the analog software. We are modifying it to provide the software with the path of the log files. Back up the original file and then, change the following lines to make them appear something like this -

# If you need a LOGFORMAT command (most people don't -- try it without first!),
# it must go here, above the LOGFILE commands.
# LOGFILE logfile.log
LOGFILE **************\ex*.log
OUTPUT COMPUTER
OUTFILE Report.dat
HOSTNAME "************** WEBSERVER"
#
b. rmagic.ini - This is the configuration needed in the file –
#
# iTransfer.org Report Magic settings file.
# Created by Abhilasha Sharma - Dec 20, 2006
#
[statistics]
File_In = **************\Report.dat
Frame_File_Out = index.html
Format= XHTML 1.0
[reports]
Active_Column=R
File_Out = reports\
Title_Font = Helvetica,Arial,sans-serif
Title_BG_Color = #000000
Title_Font_Color = #FFCC00
Data_Font = Helvetica,Arial,sans-serif
Data_Color_1 = #D0FFD0
Data_Color_2 = #F0FFF0
Data_Total_Color = #FFCC66
Data_Header_Color = #9999CC
[QUICK]
Rows = ALL
[graphs]
BG_Color = #FFFFCC

[navigation]
File_Out = nav.html
[website]
Title = Web Statistics for ******* Website
Webmaster = asharm4@**************
Base_URL = http://**************
3. Now, first run the analog.exe. This would take atleast 3-5 mins depending on the number of log files to be analyzed.

4. Once the log analysis is complete, run “rmagic.exe”. This would take the results generated by analog.exe and present them in a more readable format.

No comments: