How to Parse IIS Logs using Log Parser Studio

Logs, Logs, Logs!!!

Ever had to parse mounds of IIS web server logs for specific metrics? It can be quite painful and time-consuming!

Log Parser Studio is a fantastic utility designed for this very purpose. It can parse various flat file formats using an SQL like query language.

Some of its features include:

  • Ability to parse a variety of log file formats including, W3SVC/IIS, CSV, HTTP etc.
  • Query log files using an SQL like query language
  • Generate reports
  • Generate a PowerShell script containing your query.

Installing Log Parser Studio

  1. Download and install the Log Parser framework from https://technet.microsoft.com/en-au/scriptcenter/dd919274.aspx
  2. Download and run the Log Parser Studio GUI from https://gallery.technet.microsoft.com/Log-Parser-Studio-cd458765.

Quick Demo

In my case, I wanted to obtain a list of distinct users who had accessed my IIS website over a specific time frame.

Here is a quick example showing how easy it is to do within Log Parser Studio.

  1. Open Log Parser Studio  
    Log Parser Studio Screenshot
  2. Choose the log files you want to query
    Log Parser Studio Screenshot
  3. Create a NEW QUERY
  4. Specify the types of log files you have – in my case IIS log files.
  5. Execute your query
    Log Parser Studio Screenshot
    Log Parser Studio Screenshot

Conclusion

Log Parser is one of the great little utilities that every Microsoft developer should add to their tool bag. Definitely worth a look!

Shane Bartholomeusz

G’day, I’m a technical solutions consultant based in Perth, Australia that specialises in the Microsoft technology stack, including .NET, Dynamics 365, Azure and general web development etc.

This blog is my place to share my thoughts, helpful solutions and just random nerdy stuff.
Shane Bartholomeusz

Latest posts by Shane Bartholomeusz (see all)

3 thoughts on “How to Parse IIS Logs using Log Parser Studio

Leave a Reply