Dependant tests questions

Need new test, action, option? Post request here.
Post Reply
User avatar
greyhat64
Posts: 246
Joined: Fri Mar 14, 2008 9:10 am
Location: USA

Dependant tests questions

Post by greyhat64 »

Dependencies don't operate as I would expect. A dependency is checked on the dependent's schedule, not on the Master's.
For instance, I set up a dependency expression, such as
'%::MasterTest1::SimpleStatus%' =='DOWN'
My expectation was that as soon as MasterTest1 entered a DOWN state that the dependent test(s) would launch. Instead it waits for the dependent tests next scheduled run. I'm sure that an argument can be made for it being this way, but it's a bit backwards as I see it.

Suggestion: Wouldn't it make sense to turn this around and define a test's dependents instead of it's Masters?
Then a change in the master tests status could execute the appropriate action on the array of it's dependents. You could even define a dendency based on a folder name and the entire folder's tests would be dependent by inheritance, and any new tests added would be included. Especially handy with the classic router dependency scenario.

This also avoids the inevitable confusion if the master test is deleted or it's name is changed. Can you tell me what happens to a dependency expression if one of the master tests used in the expression is deleted or the name changes?

Which begs for an HML auditting tool, especially for Enterprise licenses, to determine if there are any 'orphan' expressions, variables, profiles, etc.
The equivalent of a Windows 'Registry Fix' tool. Better yet, have HM actively audit/validate changes whenever one is posted, or before saving the changes back to file.

And I'm admittedly lazy, so how about an expression builder for dependency expressions? I'm a keyboard klutz and fail to put the approprate quotes or double colons in the right place :oops:
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

My expectation was that as soon as MasterTest1 entered a DOWN state that the dependent test(s) would launch. Instead it waits for the dependent tests next scheduled run.
This is correct behavior.
Suggestion: Wouldn't it make sense to turn this around and define a test's dependents instead of it's Masters?
Then a change in the master tests status could execute the appropriate action on the array of it's dependents.
If you need such behavior, enable "Recheck dependant test items when master test status has been changed" option located on Behavior page in the Options dialog
Can you tell me what happens to a dependency expression if one of the master tests used in the expression is deleted or the name changes?
If you remove test, variable will not be resolved, expression will return False (in most cases) and HostMonitor will set status specified in "OtherwiseStatus" field
And I'm admittedly lazy, so how about an expression builder for dependency expressions? I'm a keyboard klutz and fail to put the approprate quotes or double colons in the right place
Something like Expression editor?
http://www.ks-soft.net/hostmon.eng/mfra ... predit.htm
Probably we can add more features into this editor :roll:

Regards
Alex
User avatar
greyhat64
Posts: 246
Joined: Fri Mar 14, 2008 9:10 am
Location: USA

Post by greyhat64 »

"Recheck dependant test items..." still waits for the master to revert back to it's 'normal' state. This still presumes that the only dependancy scenario is one in which disabling dependants is the primary purpose of defining a link between tests.
I think I'm still looking for a model where the status of the master drives the actions of the dependants to do something more. Using this model I can minimize the number of tests regularly run, only running the dependant tests to help diagnose why the master failed.
For instance, if I can query a web page's contents using the HTTP method I already know that my web server is operating properly. But if this 'Master' test fails I would like to test to see if the IIS service is running, ping the server, etc. to help diagnose the source of the problem and take appropriate action.
This is only possible if the Master 'pushes' the dependants into action immediately upon status change. Waiting on the dependants to 'catch up' isn't an option.

So I'll re-ask three of my original questions:
1. Using my scenario above wouldn't it make sense to have the Master test 'host' the dependants, rather than the other way around? Instead of 'This test depends on [another test]' you would have 'Tests that depend upon this one', and within that array you can define that dependancy by condition or expression.
2. In that scenario, wouldn't defining a dependancy on a folder help make things easier? An entire set could be enabled/disabled at once.
If you remove test, variable will not be resolved, expression will return False (in most cases) and HostMonitor will set status specified in "OtherwiseStatus" field
3. Of course this troubles me, especially the phrase '(in most cases)'. If I have an environment with potentially 20,000,000 tests containing dozens of action, report, and Connection Manager profiles, along with theoretically thousands of dependancies, expressions, and variables, wouldn't it make sense to have an auditing tool to verify and auto-correct (where feasable) the flaws.
==============================================
Something like Expression editor?
http://www.ks-soft.net/hostmon.eng/mfra ... predit.htm
Probably we can add more features into this editor :roll:
Yeah! That's what I'm talking about. You da MAN if you can pop that button next to 'This test depends upon [Expression]' and help me get it right every time. :wink:
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

"Recheck dependant test items..." still waits for the master to revert back to it's 'normal' state. This still presumes that the only dependancy scenario is one in which disabling dependants is the primary purpose of defining a link between tests.
I think I'm still looking for a model where the status of the master drives the actions of the dependants to do something more. Using this model I can minimize the number of tests regularly run, only running the dependant tests to help diagnose why the master failed.
For instance, if I can query a web page's contents using the HTTP method I already know that my web server is operating properly. But if this 'Master' test fails I would like to test to see if the IIS service is running, ping the server, etc. to help diagnose the source of the problem and take appropriate action.
I don't see any problem. You may define Ping test as dependant. Or you may define HTTP test as dependant. Everything is up to you.
This is only possible if the Master 'pushes' the dependants into action immediately upon status change. Waiting on the dependants to 'catch up' isn't an option.
So, what's wrong with "Recheck dependant test items when master test status has been changed" option? That's exactly what it does.
1. Using my scenario above wouldn't it make sense to have the Master test 'host' the dependants, rather than the other way around? Instead of 'This test depends on [another test]' you would have 'Tests that depend upon this one', and within that array you can define that dependancy by condition or expression.
May be I misunderstand you... may be you see problem that does not exist? What is the difference between 2 expressions
- TestA depends on TestB
- TestB is master for TestA
May be I wrong but I do not see any difference
2. In that scenario, wouldn't defining a dependancy on a folder help make things easier? An entire set could be enabled/disabled at once.
I do not see any problem. There are special variables
http://www.ks-soft.net/hostmon.eng/mfra ... oldermacro
3. Of course this troubles me, especially the phrase '(in most cases)'. If I have an environment with potentially 20,000,000 tests containing dozens of action, report, and Connection Manager profiles, along with theoretically thousands of dependancies, expressions, and variables, wouldn't it make sense to have an auditing tool to verify and auto-correct (where feasable) the flaws.
Ok, we will do that. What else do you want to check (except master-dependant expressions)?

Regards
Alex
User avatar
greyhat64
Posts: 246
Joined: Fri Mar 14, 2008 9:10 am
Location: USA

Post by greyhat64 »

OK, I once again I'm proven wrong! (At least I'm willing to admit it :oops: )
"Recheck..." is yet another one of those hidden gems in a product that surprises me with it's well thought out design.
May be I misunderstand you... may be you see problem that does not exist? What is the difference between 2 expressions
- TestA depends on TestB
- TestB is master for TestA
May be I wrong but I do not see any difference
The biggest difference is one of vision. If TestB is the master of more than just TestA, I'd like to be able to see that. As long as the dependants define their master(s) I have nowhere to go to see all of a master's dependants. There's value in that. Especially when you have, as I do, multiple sites with site based and intersite based dependencies. What better place to see that than on the Master test's Edit page. In leiu of that a configuration report would do. A visual tool ('web' graph, for instance) would be icing on the cake.

Regarding the folder based dependency - Are you implying here that it's something currently possible or something I can look forward to? I've seen the folder variables, which appear to be useful in reporting. But using your current model I would expect to need to go to the folder's properties, as I currently do within a tests properties, in order to define a master.

As for the auditing tool, I mentioned expressions, there are also the user defined variables. Other things, like action or mail profiles, you could audit. Or you might manage them by, for instance, not allowing a deletion if any test still uses it, or prompting with a warning/confiirmation or even prompting for a substitute in it's place prior to deletion. Connection Manager profiles don't currently have the same kind of 'hard' link, but maybe there's something that can/should be done there.

I'm sure there's more, and I would expect that you know better than I the interconnections that might require auditting or validation prior to change/deletion.

Thanks again for your prompt, and patient response.
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

The biggest difference is one of vision. If TestB is the master of more than just TestA, I'd like to be able to see that. As long as the dependants define their master(s) I have nowhere to go to see all of a master's dependants. There's value in that. Especially when you have, as I do, multiple sites with site based and intersite based dependencies. What better place to see that than on the Master test's Edit page. In leiu of that a configuration report would do. A visual tool ('web' graph, for instance) would be icing on the cake.
As usually you are asking for the option that was implemented years ago :) Test Properties dialog shows "Dependencies of this test" list.
H'm.. however I must admit, it does not show tests that depend on expression :roll: We will implement this as well.
Regarding the folder based dependency - Are you implying here that it's something currently possible or something I can look forward to? I've seen the folder variables, which appear to be useful in reporting. But using your current model I would expect to need to go to the folder's properties, as I currently do within a tests properties, in order to define a master.
Sure, you can use this variable right now in the same dependency expression where you are using '%::MasterTest1::SimpleStatus%' right now.
As for the auditing tool, I mentioned expressions, there are also the user defined variables. Other things, like action or mail profiles, you could audit.
Yes, we will do that.

Thank you for suggestions, that why we make software better and better.
If you have some other ideas, please use "Whish list" forum instead of "Problems and Bugs"

Regards
Alex
User avatar
greyhat64
Posts: 246
Joined: Fri Mar 14, 2008 9:10 am
Location: USA

Post by greyhat64 »

Once again I thank you for your patience in answering all my questions, even if they do involve already implemented solutions. :D Sometimes I'm guilty of being blinded by my own determination. :evil:
Thanks for agreeing to include expressions in that list. That's precisely why it was overlooked and not working for me (I use a LOT of expressions).

Also, the use of the folder variable is MUCH appreciated, but I do have a few observations regarding these dependency lists:
  • As we discussed earlier, the incredible flexibility and breadth of capabilities found in dependency expressions begs for an expression builder. There's just SO MUCH you can do with expressions, having an 'assistant' will help all of us make the best use of this feature. I hope this is high on the priority list.
  • There are a number of folder variables for various states (i.e. %FolderCurrent_GoodTests%), but there's not one for total number of tests contained within a folder (i.e. %FolderCurrent_Tests%), though it could be calculated by adding all the others together. This also makes me wonder it there should be a version of each of these variables that includes subfolders (i.e. %FolderCurrentWithSubs_GoodTests%).
  • At least from RCC, the buttons to add or delete a {dependencies of this test} are greyed out. Why is that?
  • Suggestion: As I see it, a test dependency is merely a predefined expression, so, with an expression builder behind the scenes, wouldn't it make sense to discontinue using the dropdown box to select [another test(s)]/[Expression] and merely define all dependencies in the editor.
    • [-] At that point a series of descrete expressions could be defined, including ones to accommodate test dependencies.
      [-] The order of priority could the be changed by running expressions up/down the list (as with test dependencies now).
      [-] Also, double clicking an entry in either dependency list could then be used to edit the expression.
Regarding the upcoming audit tool, another audit task - checking for dependency recursion. Explanation: If I have a test that uses the folder variable to define a dependency and the test is in the defined folder, it would essentially be dependant upon itself - not good. I'm testing now to see what would happen in that situation. There may be other, similar, properties to ensure against.

As for putting this in the Wish list, I agree - though it started with my mistaken view of dependency handling as a Problem. Is there any way you or I can move this to the appropriate category? I guess we could quote the wishlist items and put them in a new Wish List entry.

Sidenote: I've noticed that the FAQ section of this blog hasn't been updated in a couple of years. I don't want to take you guys away from any productive development, but you might save yourself some support time by converting some of these repetitive entries into FAQ's. I know I would use it if there was more to reference. :wink:
User avatar
greyhat64
Posts: 246
Joined: Fri Mar 14, 2008 9:10 am
Location: USA

Post by greyhat64 »

UPDATE:
I used the folder variable with the following results:
HM 7.42 / RCC 2.50
  • "Recheck dependant test items..." has been enabled. (Master test obsolete after 60 seconds)
  • Set up a service test named "servicetest" as the master. Alerter service used for testing, currently in the 'Started' state.
  • Set up a ping test, using the expresssion "%::root\TestFolder::FolderCurrent_BadTests%>0" as the dependency expression.
  • Set up a second ping test using the expression "'%::servicetest::SimpleStatus%'=='DOWN'" as the dependency expression.
  • Initially both dependant tests start in the 'Wait for Master' state, as expected.
  • Once I shut down the Alerter service, both remain in the 'Wait for Master' state until the next scheduled run for the dependant. (I'm confused - this is what I was talking about earlier. I want these tests to kick off immediately.)
  • Once I restart the Alerter service, both remain in the active 'Ping is successful' status until the next scheduled run for the dependant. (Not as big a deal, since they don't execute again, but it does mean they unnecessarily present a non-waiting status in the meantime.)
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Quote from the manual
===================
Recheck dependant test items when master test status has been changed
This option tells HostMonitor to recheck all dependant test items immediately after their master test failure or recovery (otherwise tests will be executed on regular schedule). This helps to maintain more accurate statistic information. Note: option does not have effect for tests that depend on logical expression.
===================
So, lets move into "whish list" forum

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

Post by KS-Soft »

As we discussed earlier, the incredible flexibility and breadth of capabilities found in dependency expressions begs for an expression builder. There's just SO MUCH you can do with expressions, having an 'assistant' will help all of us make the best use of this feature. I hope this is high on the priority list.
There is expression editor, it can be used for "warning" and "normal" expressions, advanced mode actions, etc. We have added this editor for "dependant" expression in version 7.46 (will be available for download soon). We plan some improvements for this tool in future.
There are a number of folder variables for various states (i.e. %FolderCurrent_GoodTests%), but there's not one for total number of tests contained within a folder (i.e. %FolderCurrent_Tests%), though it could be calculated by adding all the others together.

Why do you need such variable? Usually people checks for bad tests...
This also makes me wonder it there should be a version of each of these variables that includes subfolders (i.e. %FolderCurrentWithSubs_GoodTests%)
Well, if you really need this variable, we can implement it.
At least from RCC, the buttons to add or delete a {dependencies of this test} are greyed out. Why is that?
Its rather a decoration than real buttons. HostMonitor allows you to create dependant list.... Everyone was happy with this for last 8 years :)
Suggestion: As I see it, a test dependency is merely a predefined expression, so, with an expression builder behind the scenes, wouldn't it make sense to discontinue using the dropdown box to select [another test(s)]/[Expression] and merely define all dependencies in the editor
Not really. When test depends on list of other tests, HostMonitor uses completely different, more efficient and faster algorithm. If you can use simple list of master tests, use the list.
Regarding the upcoming audit tool, another audit task - checking for dependency recursion
Menu View -> Estimated load -> Check relations.
It does not check expressions, yet :(

Regards
Alex
User avatar
greyhat64
Posts: 246
Joined: Fri Mar 14, 2008 9:10 am
Location: USA

Post by greyhat64 »

Boy, I can't wait for 7.46! :o
As for the %FolderCurrent_Tests%, I was going to use that in an expression that essentially activates a dependant if %FolderCurrent_Tests%>%FolderCurrent_GoodTests%, accounting for all non-good tests. Writing this now I just know you're gonna tell me that there's a better way.
I see the need for -WithSubs- variables because, for instance, I may have a multifunction server with each subfunction represented by a subfolder. I may run some systemwide tests if ANY subtest fails.
Non-functional buttons - Man, I've gotta get our developers to start adding some to our own software! :lol: Honestly, if you enable them, along with the upcoming dependency expression builder, I would have nothing more to complain about regarding master/dependant editting, for a while anyway :wink:
As for my "Suggestion:..." - OK, I get it - test dependencies are faster than expression dependencies. The main point is, for those of us who might find it helpful, could you make it possible to define multiple expressions or even mix/match test and expression dependencies. I know your gonna ask for an example - I'm working on it. Sometimes I anticipate a need before I actually have one - it's a curse 8).
And my audit tool suggestion - I knew that was available, I'm just suggesting it be integrated into a comprehensive audit tool. And, as you imply, expressions will have to be parsed in order for the tool to be of any value.

Once again, you've done an excellent job of addressing everything, almost.

"Recheck dependant test..." I'm sure there are hurdles involved in making this function within the context of logical expressions. If moved into the "wish list" do you forsee it being a priority? (Please say yes! :wink: )
As for the FAQ section, I'd edit it myself but I don't feel qualified. :P
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Boy, I can't wait for 7.46!
I think we release this version next week.
As for the %FolderCurrent_Tests%, I was going to use that in an expression that essentially activates a dependant if %FolderCurrent_Tests%>%FolderCurrent_GoodTests%, accounting for all non-good tests
Ok, we will implement this in version 7.46. We have this task in "to do" list anyway. Low priority but its easy to implement without any side effects
I see the need for -WithSubs- variables because, for instance, I may have a multifunction server with each subfunction represented by a subfolder. I may run some systemwide tests if ANY subtest fails
We can implement this as well... just need to think out for good and not long abbreviation for such variables.
Non-functional buttons - Man, I've gotta get our developers to start adding some to our own software! Honestly, if you enable them I would have nothing more to complain about regarding master/dependant editting, for a while anyway
This task has low priority, not sure we will implement this option soon.
could you make it possible to define multiple expressions or even mix/match test and expression dependencies.
I don't think we will do that.
"Recheck dependant test..." I'm sure there are hurdles involved in making this function within the context of logical expressions. If moved into the "wish list" do you forsee it being a priority?
Yes, I have increased priority.
Once again, you've done an excellent job of addressing everything, almost.
Thank you :)
As for the FAQ section, I'd edit it myself but I don't feel qualified.
If you send nice and useful article to support@ks-soft.net, we can publish it :)

Regards
Alex
User avatar
greyhat64
Posts: 246
Joined: Fri Mar 14, 2008 9:10 am
Location: USA

Post by greyhat64 »

KS-Soft wrote:
could you make it possible to define multiple expressions or even mix/match test and expression dependencies.
I don't think we will do that.
Sad. While I trust your reluctance is soundly based, I think I can make a good case for it, someday. I'm still noodling on a justifiable, complex expression list that would make the case.

Until then, Cheers!
Post Reply