29 June 2006
Ajax Command Prompt - Query IIS Log using MS Log Parser 2.2
It's finally here. After weeks of fooling around with the web Command Prompt, I finally decided to integrate something useful to it -
A web statistics query Command Prompt - Please see the demo here. Mainly to showcase the flexibility of Web Command Prompt and how
easy it is to develop and integrate your own custom commands.
A few weeks back, I came across MS LogParser 2.2. Really amazing. It allows you to parse log file using SQL Select statement. Perfect to be the backend of my Command Prompt. To bridge the gap, I use AjaxPro.NET to bring the data back from the MS LogParser and inject the result into the command prompt. Voilla perfect!
For simplicity's sake, all commands so far are based on the article "
Forensic
Log Parsing with Microsoft's LogParser " by Mark Burnett 2003 - 07 - 18.
Here is a quick List of the custom commands I did in corresponds to the quries discussed in the article. For details of what the queries do, please refere back to Marks' article and guess which commands here matches his descriptions? :)
Command Lists- webstats successful attempts
- webstats top NonStandardUserAgent
- webstats top hits
- webstats top PossibleAttacks
- webstats top PageErrors
- webstats top HitsPerPage
- webstats top RecordedErrors
- webstats top BrokenLinks
- webstats top Win32Errors
- webstats top HttpMethods
- webstats top BytesSendToClient
- webstats top BytesSendFromClient
- webstats top TimeSpendProcessing
Not everything is perfect yet, but this shall demostrate what the web command prompt is capable of.