KS-Soft. Network Management Solutions
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister    ProfileProfile    Log inLog in 

[HowTo?] - execute a test /only/ by another test

 
Post new topic   Reply to topic    KS-Soft Forum Index -> Configuration, Maintenance, Troubleshooting
View previous topic :: View next topic  
Author Message
rasc



Joined: 11 Oct 2009
Posts: 94

PostPosted: Thu Oct 27, 2011 5:10 am    Post subject: [HowTo?] - execute a test /only/ by another test Reply with quote

Hi,

I am sorry if this is too simple for me to find out but I did not get the following to work:
LogfileTest1 is done each hour for Event1 (log entry) and BAD action shall be to execute/refresh LogfileTest2 (check another log file if the corresponding entry Event2 exists).
LogfileTest1s BAD actions are 'execute HMS script' and ReTest, the script only contains 1 line: 'RefreshTest LogfileTest2'.
LogfileTest2s BAD actions are: Send mail and (eternally) ReTest.
Event1 does happen sporadically, sometimes only once a week.

What I already tried for LogfileTest2:
- using LogfileTest1 as master test (perform when bad)
--> doesn't work as LogfileTest1 immediately returns to good status, LogfileTest2 isn't executed
- disable it and (enable it, refresh it, disable it) by HMS script
- pause it and (resume it, refresh it, pause it) by HMS script
--> both does't help because the test sends the mail but does not retest (so the test stays BAD/red)
- using regular schedule of 23:59:59
--> test is executed by itself, giving false warning
- using irregular schedule
--> test is not executed (I guess because it is out of schedule)

What could I do to have LogfileTest2 reliably and fully (including 'eternal' ReTesting) executed, but /only/ as BAD action of LogfileTest1?


Thank you!
Back to top
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 10399
Location: USA

PostPosted: Thu Oct 27, 2011 6:05 am    Post subject: Reply with quote

Master-dependant relation should work.

I do not understand why "LogfileTest1 immediately returns to good status"?
Is it because you setup too short test interval for it? 1 sec? But you said "LogfileTest1 is done each hour"?
Or you set too short value for "Consider status of the master test obsolete after N seconds" option?
Or you are using "RefreshTest LogfileTest1" script command?

"RefreshTest LogfileTest2", Pause, Disable and other similar commands will not work in your case because you set Irregular schedule for this test.

We can add some command like RefreshIrregularTestByID in new version
Or you can set Regular schedule and use EnableTest/DisableTest commands when you need to perform this check

Regards
Alex
Back to top
View user's profile Send private message Send e-mail Visit poster's website
rasc



Joined: 11 Oct 2009
Posts: 94

PostPosted: Thu Oct 27, 2011 6:32 am    Post subject: Reply with quote

Thank you for your answer, Alex.

Test 1 immediately returns to good status because it's a logfile test (we always configure logfile tests to ReTest as bad action, so the HM-icon stays blue).

I did that Pause, Disable, etc with regular schedule. The test is executed, but the bad action ReTest isn't (I guess because the test then is already disabled/paused). In the result the test stays bad and HM icon is red.

RefreshIrregularTest was an idea, a better one might be Delay <seconds> in HMS scripts because it served more purposes than just RefreshIrregularTest . So I could set schedule 23:59:59, Disable test, (enable, refresh, wait 10s, disable) by HMS.


Thank you.

P.S. An action Wait (s) was great too, if the actions are executed sequentially. It helped me in some cases and also helped Thore and others.
Back to top
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 10399
Location: USA

PostPosted: Thu Oct 27, 2011 6:55 am    Post subject: Reply with quote

Quote:
I did that Pause, Disable, etc with regular schedule. The test is executed, but the bad action ReTest isn't (I guess because the test then is already disabled/paused). In the result the test stays bad and HM icon is red

Did you assign
- script with EnableTest LogfileTest2 command to LogfileTest1 test?
- script with DisableTest LogfileTest2 command to LogfileTest2?
Then it should work...

If you assign 1 script with all commands (EnableTest LogfileTest2, ResfreshTest LogfileTest2 and DisableTest LogfileTest2) to LogfileTest1, this will not work.

Quote:
RefreshIrregularTest was an idea, a better one might be Delay <seconds> in HMS scripts because it served more purposes than just RefreshIrregularTest . So I could set schedule 23:59:59, Disable test, (enable, refresh, wait 10s, disable) by HMS

Delay HM script command will not work because HostMonitor stops all tests and actions until it performs HM Script.

Quote:
An action Wait (s) was great too, if the actions are executed sequentially

HostMonitor may execute many actions at the same time so this will not work. Unless we will be able to add some "delay" option for every/any action...
But I think its much more easy to implement RefreshIrregularTest command, we will do this in next version.

Regards
Alex
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    KS-Soft Forum Index -> Configuration, Maintenance, Troubleshooting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

KS-Soft Forum Index