Hello all,
I have some problems with the "This test depends on Expression" function. To keep the creation of multiple test simple, i created a folder for each host. Then i created the "master" test (wich is a simple ping, once a minute) with %folder% as its testname. All other tests for this host are using the "This test depends on" with ('%::%folder%::SimpleStatus%'=='UP') as expression with "Synchronize counters" on and "Synchronize status & alerts" off.
The problem is that some of the tests get the "Wait for Master" status, which can last for hours. They correct themself from Time to Time but after a few minutes to an hour they fall back to the "Wait for Master". If i do a manual refresh it allways gets the correct Status.
If i simply replace the %folder% Varialbe in "This test depends on Expression" with the correct Testname, everything works as expected.
So... was it a stupid idea to use the %folder% variable, or is there something else to look for...
HM 7.74 - This test depends on Expression with %folder% var
Quote from the manual
==================
If you want to access the parameters of some specific test (not just the one that had triggered an action), specify the name of a test or id of the test confined by a double colon (::) in front of the name of the macro variable ( %::<testname>::<macrovariable>% or %::<testid>::<macrovariable>% ). E.g. if you want to access "Reply" and "Status" fields of the "Ping Yahoo" test, use the following syntax for the variables: %::Ping Yahoo::Reply%, %::Ping Yahoo::Status%
To find out ID of the test items, you may use Custom HTML report with %TestID% macro variable.
==================
In other words, "officially" HostMonitor does not allow you to use macro variable instead of test name or test ID when this name is part of another variable.
"Unofficially" HostMonitor allows you to use variable inside of other variable, in some cases. However in case of master-depentant expression its not possible, HostMonitor will not create list of master tests for the item.
Probably we can add such option in future versions.. you may post request into "Whish list" forum.
Regards
Alex
==================
If you want to access the parameters of some specific test (not just the one that had triggered an action), specify the name of a test or id of the test confined by a double colon (::) in front of the name of the macro variable ( %::<testname>::<macrovariable>% or %::<testid>::<macrovariable>% ). E.g. if you want to access "Reply" and "Status" fields of the "Ping Yahoo" test, use the following syntax for the variables: %::Ping Yahoo::Reply%, %::Ping Yahoo::Status%
To find out ID of the test items, you may use Custom HTML report with %TestID% macro variable.
==================
In other words, "officially" HostMonitor does not allow you to use macro variable instead of test name or test ID when this name is part of another variable.
"Unofficially" HostMonitor allows you to use variable inside of other variable, in some cases. However in case of master-depentant expression its not possible, HostMonitor will not create list of master tests for the item.
Probably we can add such option in future versions.. you may post request into "Whish list" forum.
Regards
Alex