Today lets see how to prepare IIS Log files to load into Power BI Dashboard. The 'software-performance' GitHub repo contains sample IIS Log files along with the tools. We can use the same for the demo.
Prerequisites
Below are the prerequisites to complete the steps which help us to analyze IIS Logs via Power BI.
- A machine with Windows OS as all the tools used are compatible with Windows only.
- Basic understanding of Windows PowerShell
- LogParser utility
- Of course the Power BI Desktop application.
Steps
Let's see the steps
- The first, step is to clone the 'software-performance' GitHub repo into a local directory. How to clone a repo is not in the scope of this tutorial. Please refer to the link provided. Let's consider is it cloned into c:\source\repos folder
- Second step is to convert .log files into .csv. Open Windows PowerShell ISE better "run as administrator". Then navigate to the cloned folder where the IIS to CSV.ps1 file is available.
- Once we open the IIS to CSV.ps1 file, make sure the variable $pathToLogParserExe has the correct path to the installed logparser.exe file
- Change the value of $inputPath to the folder where IIS Log files are located. Let's use the sample logs provided in the software-performance repository.
- Run the script by clicking the button of press F5
- It will convert the .log files to .csv files. We can see the CSV files created in the same folder of input log files.
- Now open the Power BI sample file present in the repo
- Click on the Edit Queries drop-down then- > Data source settings
- We can see the current folder used. Click on the 'Change Source' button in the bottom left. Enter the path to the folder where CSV files created
- Press Ok then Close buttons.
- Finally, click on the 'Refresh' button. It will load the data from files into Power BI and render reports.
It may take more time depending on the size of CSV files. Normally the speed is observed as 1MB/second.
The same steps along with a short description of dashboards available in the below video
The same steps along with a short description of dashboards available in the below video
2 comments:
Thank you so much for exploring the best and right information.
Powerbi Read Soap
I would like to thank the author for his useful and informative blog post about Power BI.
Powerbi Read Rest
Post a Comment