Irregular Schedule Test run twice

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
magnells
Posts: 3
Joined: Wed Aug 24, 2005 2:40 pm

Irregular Schedule Test run twice

Post by magnells »

I have a test that has a once per week irregular schedule. It is an Active Script test that sends a request to a remote server which then makes a phone call.

Most of the time the test executes the script twice. This is evidenced by getting two calls and by two log files generated by the script. The recurrences column in the monitor is, however, only incremented once.

If I call the script via the Test button in the Test Properties dialog, it only executes once.

My system is running XP Professional Version 2002 Service Pack 1

The test details: Method = Script
;--- Common properties ---
;DestFolder = Mon1\Daily Sanity Test\
Title = 1. Monday Sanity Test
Comment = Perlscript: sas-sanitytest.pl"
RelatedURL =
ScheduleMode= OneTestPerWeek
ScheduleDay = 1
ScheduleTime= 07:00:00
Alerts = !!CRITICAL (1try)
ReverseAlert= No
UnknownIsBad= Yes
UseCommonLog= Yes
PrivLogMode = Default
CommLogMode = Default
;--- Test specific properties ---
ExternalFile= C:\Program Files\HostMonitor5\sas-sanitytest.pl
Language = Perlscript
Timeout = 20000
AllowUI = No
UseMacros = Yes
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

What's in the action profile? May be alert starts second script?
Could you send HML file with tests and *.LST files to support@ks-soft.net?

Regards
Alex
magnells
Posts: 3
Joined: Wed Aug 24, 2005 2:40 pm

Post by magnells »

The action profile just sends two emails on a Bad status if the perlscript fails..

I will send the files.

Thanks.
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

HostMonitor starts script just one time. I checked source code and tested HM using your settings...
May be you have 2 instances of HostMonitor started? E.g. one instance stated as service, another as application?

Regards
Alex
magnells
Posts: 3
Joined: Wed Aug 24, 2005 2:40 pm

Post by magnells »

Thank you, Alex.

It must have been two copies running, since when I exited the window on my screen, it showed the monitor as still running.

I must have opened a second copy, several days ago, from the desktop while a running monitor was minimized.

I exited all copies and checked the process list to make sure no instance was running. I then restarted by opening a desktop icon, minimized the window and repeated the open from the desktop icon. Sure enough, a second instance started.

That would explain why sometimes only one call would happen.

I assume that the recurrences count displayed in the tableis a in memory value and reflects only the instance of the monitor that ran the test. This is what confused me.

Thanks again for pointing out my pilot error. The proof is in tomorrow morning's test.
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

I assume that the recurrences count displayed in the tableis a in memory value and reflects only the instance of the monitor that ran the test.
Yes, if you start several instances, each instance performs tests independently. Each copy of HostMonitor will perform tests and increase its own copy of recurrences counter

Regards
Alex
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Probably we need to add some check on startup. HostMonitor started in application mode checks for started service instance and display warning, may be its good to check for applications as well...

Regards
Alex
Post Reply