Is it possible to have TM ART check a URL every 10 seconds?
When a customer asked me about this back in June I was skeptical. But instead of running the monitor every 10 seconds what you do is have the monitor loop every 10 seconds and have the monitor check the URL inside the loop. After each URL check the script checks for errors and stops the monitor and sends the data back to TM ART Central if an error is detected.
I sent the customer a script that I thought he could use as an example and I starting running it on a test system here at BMC Software also.
The monitor that I used is attached. It is just a sample, of course.
So you add that monitor to a project. I suggest creating a new project just to keep it simple starting out.
And here are the parameters you specify when you add the monitor to the project:
Notice that you could even set the time between URL checks to be even less than 10 seconds but you wouldn't want to do that would you?
And since I want to run the monitor every ten minutes I set the number of loops to 60.
I turned off TrueLogs because the .wrt file that the script generates seems to have enough information in it. The .wrt file is way smaller than the TrueLog so it will take up a lot less room in my TM ART repository and be written faster.
And now the schedule:
I want it to run every 10 minutes.
And the execution log:
Most TM ART monitors run in a few seconds. But notice that this monitor takes 590 seconds, just 10 seconds shy of 10 minutes, to run because of all that wait time.
And the result details:
Notice the count is 60 because the monitor checked the URL 60 times during the 10 minutes that it ran.
The monitor produces a .wrt file when it encounters an error with the application that it is monitoring. Here is an example of the contents of that .wrt file:
2013-07-26 10:46:23 WebPageUrl : http://trex002:19120/bmc
2013-07-26 10:46:23 Error Number: 10061, Facility: 6, Severity: 3
2013-07-26 10:46:23 WinSock: 10061 - Connection refused
2013-07-26 10:46:23 host="trex002:19120", attempts=3
2013-07-26 10:46:23 In line 164 of C:\temp\SCC_ExecServer_19124_19125\PerfProjects\PerfPrj_111_1374844742009\MonitorLoop.bdf
2013-07-26 10:46:23 Loop counter = 39 of 60
The monitor seemed to work fine.
Does anyone else think this might be useful?