I have made a script that will search for a word in a logfile and send the result back as performance data to Ops Mgr 2007.
With default settings will the script look in the IIS log files (C:\windows\system32\LogFiles\W3SVC1\) for the last hour and search for the word “POST”. It will then return how many times that word is in the file as performance data.
To use this script you can create a new Collection Rules/Probe Based/Script (Performance), paste the script into the “script box”, input suitable performance mapping information. If you change the “Value” (default $Data/Property[@Name=’PerfValue’]$) you must also change this in the script. Remeber to configure your IIS to generate a logfile for every hour, or modify the script.
I have configure my script to run every 70 minutes synchronize at 00:00. It will then run 10 minutes past every hour and tot up the hour before.
You can download the script here. Send me a e-mail if you have any feedback or suggestions.
One thought on “Script That Returns Performance Data”
Comments are closed.