Hi Mikie,
I have written something that you could possibly use, it is a combination of configuration and batch files and it embeds logparser commands that monitor our server farm at work for min, max and average responses that exceed a parameterised value.
You may be able to use these to achieve what you want - I use the scheduler to run this on an interval and then if there is any response over the threshold, send out Emails and SMS messages.
The batch file accepts the name of a configuration file for each of the servers it must monitor which has the "well known" server name and the share where the logs can be found.I have inserted one sample, as we run multiple different clusters and they have different criteria for response times. You can create a directory on your machine and copy and paste the following into the appropriate files in that directory.
The config file looks something like this and can be called whatever you like as it is input to the batch file as a parameter;
iis-server1 \\iis-server1\IISLogs\W3SVC1\
iis-server2 \\iis-server2\IISLogs\W3SVC1\
iis-server3 \\iis-server3\IISLogs\W3SVC1\
iis-server4 \\iis-server4\IBSLogs\W3SVC1\
The batch file looks something like this, mine is called performance.bat and it accepts 2 parameters the first being response time in milliseconds, the second, the name of your config file. You may need to play with your date and time variables in the batch file (ourdate and exdate), as this is dependent on your regional settings and your log file names;
@echo off
if %1.==. (
echo Missing parameter for response time threshold in milliseconds
echo Missing parameter for server config file
exit 1
)
if %2.==. (
echo Missing parameter for server config file
exit 1
)
%~d0
cd %~p0
if not exist %2 echo No server config file called %2 found in the performance directory. & goto :EOF
set ourdate=%DATE:~10,4%%DATE:~4,2%%DATE:~7,2%
set exdate=%ourdate:~2,6%
echo ########################################################################
echo Processing the IIS logs for %ourdate% on %DATE% at %TIME%
echo ########################################################################
if not exist %ourdate% mkdir %ourdate%
cd %ourdate%
if exist perf_%2 del perf_%2
for /F "tokens=1,2" %%i in (..\%2) do logparser "SELECT '%%i' as Server, max(time-taken) AS MaxTime, min(time-taken) AS MinTime, avg(time-taken) AS AvgTime, count(*) as Transactions from %%jex%ourdate:~2,6%.log" -i:iisw3c -iCheckPoint:%%i.lpc |findstr iis >> perf_%2
for /F "tokens=1,2,3,4,5" %%i in (perf_%2) do echo %TIME% %%i max %%j min %%k average %%l transactions %%m
for /F "tokens=1,2,3,4,5" %%i in (perf_%2) do if %%l GTR %1 echo Average transaction time is %%l miliseconds which is greater than the setting of %1 & exit %%l
When you run the job, it will create a sub diretory with the name of the date in YYYYMMDD format, if it doesn't already exist, in here it will put it's output files, which should look something like this;
iis-server1 5531 0 250 148
iis-server2 15062 0 297 125
iis-server3 1687 0 160 138
iis-server4 2265 0 229 154
As I do not know your technical level, if you don't understand any of this, let me know and I will elaborate and put in more detail for you.
If you like this, I have written a complimentary set that runs at end of each business day and produces various reports and charts for the entire day.
Trust this helps, good luck and enjoy.
Cheers, Dave