Introduction:
IIS log files can contain some interesting data that is not easily available regarding a Symantec Management Platform server activity, agent communication trends or policy schedules. aila2 [1], the Altiris IIS Log Analyzer, allows you to generate summary files for a given IIS log, however handling a large collection of files or server make usings aila2 on its own difficult.
To make the use of aila2 simpler we have created ail2-runner. aila2-runner allows you to maintain a collection of JSON summary file for a given folder content (the IIS log folder) over time and is attached here.
Usage:
Usage: aila2-runner -i <input path> -o <output path> aila2-runner will parse the input path for IIS log files (*.log) and will check if a corresponding file exists in the output path (*.json). If not the log file will be parsed with aila2 to generate a json result file in the output path. Parameters: -h, --help Show this help message -v, --version Output program version only -i, --in-path The path to the directory containing the IIS log files -o, --out-path The path to the directory where the result files are stored.
Additional notes:
The output json file will be named as the input log file. You can schedule the program to run daily and it will keep your output directory in-synch with the input directory, with the exception of the current log file, which is not available for reading until the http.sys kernel driver complette the write operations (but this is a good feature and it ensures we only parse complete log files).
Sample execution:
In my test system (vbox-atrs5) I have just run the following command:
C:\aila2>aila2-runner -i c:\inetpub\logs\LogFiles\W3SVC1 -o c:\inetpub\wwwroot\atrs5
Now running aila2.exe -f "c:\inetpub\logs\LogFiles\W3SVC1\u_ex140102.log" -o "c:\inetpub\wwwroot\atrs5\"... We have read 5244 lines in 355 milli-seconds. The file c:\inetpub\logs\LogFiles\W3SVC1\u_ex140102.log has 1 schema definition and 5240 data lines. ... [truncated here] ... Now running aila2.exe -f "c:\inetpub\logs\LogFiles\W3SVC1\u_ex140113.log" -o "c: \inetpub\wwwroot\atrs5\"... We have read 3314 lines in 249 milli-seconds. The file c:\inetpub\logs\LogFiles\W3SVC1\u_ex140113.log has 1 schema definition and 3310 data lines. Now running aila2.exe -f "c:\inetpub\logs\LogFiles\W3SVC1\u_ex140114.log" -o "c:\inetpub\wwwroot\atrs5\"... Could not access file u_ex140114.log. Terminating now...
Input directory view:
C:\aila2>dir c:\inetpub\logs\LogFiles\W3SVC1\*.log Volume in drive C has no label. Volume Serial Number is 88F9-3F46 Directory of c:\inetpub\logs\LogFiles\W3SVC1 22/11/2012 01:00 1,583,922 u_ex121121.log 23/11/2012 01:00 1,777,013 u_ex121122.log ... [truncated here] ... 13/01/2014 01:02 589,326 u_ex140112.log 14/01/2014 01:00 616,668 u_ex140113.log 14/01/2014 01:00 311,745 u_ex140114.log 290 File(s) 350,167,787 bytes 0 Dir(s) 5,030,363,136 bytes free
Output directory view:
C:\aila2>dir c:\inetpub\wwwroot\atrs5\*.json Volume in drive C has no label. Volume Serial Number is 88F9-3F46 Directory of c:\inetpub\wwwroot\atrs5 02/01/2014 22:48 6,211 siteconfig.json 02/01/2014 00:54 2,531 u_ex121121.json 02/01/2014 00:54 2,479 u_ex121122.json ... [truncated here] ... 14/01/2014 12:10 2,366 u_ex140111.json 14/01/2014 12:10 2,365 u_ex140112.json 14/01/2014 12:10 2,367 u_ex140113.json 291 File(s) 738,350 bytes 0 Dir(s) 5,030,363,136 bytes free
Document history:
Version 1:
Releasing version 1 of the tool (based on Github tag Version-1.2).
File details:
- File name: aila2-runner.zip
- File sha256 sum: 0a987f2f938888de12de5a2b026274a7d777f95dc4d010f5bb90072b4f574dfd