Scripting with folders

General chat about HostMonitor (all messages posted before March 07, 2003 available here).
Locked
grberk
Posts: 15
Joined: Mon Apr 22, 2002 6:00 pm

Post by grberk »

Maybe I am missing something here. I have several hosts and routers that I have setup to monitor. I have setup a folder for each T1 that the devices are connected to. I would like it so that it the router for a particular T1/Folder goes out, it will disable tests on the remaining hosts in that folder. I was able to do this before using the DisableTest _AllTCP so it would turn everything else off, and then run the script using EnableAllTests to turn them all back on. This still works, but I don't want to disable tests on everything, just in that folder/T1. Is this possible? I thought I read that the scripting would handle this, but I have yet to find and example.

Oh, BTW - in v 3.10 beta, the test type for SMTP shows up in the list as SNMP. Just thought you might want to know that....
KS-Soft
Posts: 12825
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Yes, you can work with specified folder only. There are two new commands:
SetCurrentFolder <name of folder>|<full path>
IncludeSubfolders yes|no
Also you can setup your T1 device as Master test for other tests and do not use script at all.

Regards
Alex

PS Thank you for the tip about SMTP. Will be corrected
grberk
Posts: 15
Joined: Mon Apr 22, 2002 6:00 pm

Post by grberk »

Ok, so how do I implement this? Here is an example of my settings:

I have a router and 5 hosts under the root/qwest folder.

If the router goes down, I want to disable all of the hosts testing in the root/qwest folder.

What is the proper format for this in a script?

What is the proper format to re-enable the tests?
KS-Soft
Posts: 12825
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

If in old version you used "DisableTest _AllTCP", you can still use this command:
;----------------------------------------
; script to disable tests
SetCurrentFolder qwest
DisableTest _AllTCP
;----------------------------------------

;----------------------------------------
; script to enable tests
SetCurrentFolder qwest
EnableAllTests
;----------------------------------------

Regards
Alex
grberk
Posts: 15
Joined: Mon Apr 22, 2002 6:00 pm

Post by grberk »

Ok, I almost have this working now. BUT...

If I disable a test, and then re-enable it, the test wants to run a profile, which I have set to email me. So, if the script runs and disables 5 hosts even though they aren't really down, when the router comes back and re-enables the hosts, every single test sends me an email. Is this an over-looked bug, or am I doing something wrong?
KS-Soft
Posts: 12825
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

I will investigate problem with alert actions. BUT...
I still don't understand why do you use script. It was necessary in version 1.xx. In version 3.xx you just define you T1 device as Master test for other tests. In latest version http://www.ks-soft.net/download/hm313.zip you can setup Master test for group of selected tests in one shot.

Regards
Alex
grberk
Posts: 15
Joined: Mon Apr 22, 2002 6:00 pm

Post by grberk »

My mistake! I was using the wrong version at work, and the newest one at home. I see how it works without the script by using master and dependency tests. I have it working now. Thanks for your quick assistance!
KS-Soft
Posts: 12825
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

I fixed problem with wrong alerts. HostMonitor 3.xx has option "Reset Recurrences when test gets disabled". This options didn't work properly (it always resets counter). I fixed it, in next version everything will be Ok.

Regards
Alex
Locked