It would be good to be able to create a test that was nothing more than a logical test on other tests.
So if TestA and TestB are two tests then:-
TestC = (TestA==UP) or (TestB==UP)
TestC = (TestA==UP) and (TestB==UP)
etc
You can currently use logic to determine if a test is run. However I don't want to do that. I just want a test result that is a logical formulation of the status of multiple other tests.
Logic test
I think there is simple workaround - use dependant test with predefined result, e.g. Ping 127.0.0.1. If condition is True, test will ping localhost and return "alive" status; otherwise HM sets specified status ("Bad").It would be good to be able to create a test that was nothing more than a logical test on other tests.
Sorry, I do not understand what that means. Something like "If TestA returns UP status 54 time in a row and never returns DOWN status"??TestC = if( TestA==UP, 54, 0 )
Regards
Alex
I tried exactly this approach myself but it does not achieve the objective.I think there is simple workaround - use dependant test with predefined result, e.g. Ping 127.0.0.1. If condition is True, test will ping localhost and return "alive" status; otherwise HM sets specified status ("Bad").
If the status of the logic evaluates to false then the workaround test simply does not run rather than returning a BAD status.
It would seem that not running the test is not the same as an UNKNOWN status so the checkbox that says to evaluate UNKNOWN as BAD never comes into play.
After lots of testing I believe that achieving the objective requires new functionality.
Just to elaborate more the specifics of what I am trying to do.
We have two SMTP gateways into our organisation. I don't care if one of them is down but I want to know if they are both down. Also I have lots of tests that are only relevant if both are down. If only one of them is down then we don't need to do many of the tests and associated alerts.
I have setup two tests:-
SMTP1 that attempts an SMTP connection to the first SMTP gateway.
SMTP2 that attempts an SMTP to the second parallel SMTP gateway.
I created a third test as follows.
TEST3 called: SMTP-system
The test pings 127.0.0.1.
The relevant logic settings are:-
I have tried other settings for the OtherwiseStatus such as BAD and UNKNOWN but with no success. I refresh the test and it always says that the status is Wait for Master.
We have two SMTP gateways into our organisation. I don't care if one of them is down but I want to know if they are both down. Also I have lots of tests that are only relevant if both are down. If only one of them is down then we don't need to do many of the tests and associated alerts.
I have setup two tests:-
SMTP1 that attempts an SMTP connection to the first SMTP gateway.
SMTP2 that attempts an SMTP to the second parallel SMTP gateway.
I created a third test as follows.
TEST3 called: SMTP-system
The test pings 127.0.0.1.
The relevant logic settings are:-
The problem is that when run the status of test3 always says: Wait for MasterThe test depends on: Expression.
Perform test if: ('%::SMTP1::SimpleStatus%'=='UP') or ('%::SMTP2::SimpleStatus%'=='UP')
OtherwiseStatus: No Answer
I have tried other settings for the OtherwiseStatus such as BAD and UNKNOWN but with no success. I refresh the test and it always says that the status is Wait for Master.
If you want to start alert when both servers do not respond, use "advanced" mode for the action and condition like ('%::TestA::SimpleStatus%'=='DOWN') and ('%::TestB::SimpleStatus%'=='DOWN') and ((%::TestA::Recurrences%==1) or (%::TestB::Recurrences%==1))We have two SMTP gateways into our organisation. I don't care if one of them is down but I want to know if they are both down. Also I have lots of tests that are only relevant if both are down. If only one of them is down then we don't need to do many of the tests and associated alerts.
To setup dependant tests you may use similar condition, e.g. ('%::TestA::SimpleStatus%'=='DOWN') and ('%::TestB::SimpleStatus%'=='DOWN')
Mark "Synchronize status&alerts" option in the Test Properties dialogI have tried other settings for the OtherwiseStatus such as BAD and UNKNOWN but with no success. I refresh the test and it always says that the status is Wait for Master.
Regards
Alex