Associate two tests

Need new test, action, option? Post request here.
Post Reply
AntonyP
Posts: 159
Joined: Mon Jan 02, 2006 9:40 am
Location: Athens Greece

Associate two tests

Post by AntonyP »

This is a feature i would very much like to see in HM.

I have configured two seperate tests for the end points of a tcp/ip connection. Can i create a third test that will go red when either of the above two tests goes red and then go back to green once both of the above two tests are green?
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

AntonyP
Posts: 159
Joined: Mon Jan 02, 2006 9:40 am
Location: Athens Greece

Post by AntonyP »

I will try using

('%::TestA::SimpleStatus%'=='UP') or ('%::TestB::SimpleStatus%'=='UP')

where TestA is the test name, right?

The keyword UP should be replaced by the value in the test response, like 1 or 2 or Ok, or is it a standard keyword?
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

...go back to green once both of the above two tests are green
...
('%::TestA::SimpleStatus%'=='UP') or ('%::TestB::SimpleStatus%'=='UP')
I think you should use 'and' instead of 'or'
where TestA is the test name, right?
Right
The keyword UP should be replaced by the value in the test response, like 1 or 2 or Ok, or is it a standard keyword?
Quote from the manul:
%SimpleStatus% - This macro can have one of the three text values:
- "UP" for all good statuses (Host is Alive, Ok);
- "DOWN" for all bad statuses (No answer, Bad, Bad Contents);
- "UNKNOWN" if status of the test is Unknown or Not Resolved.

Please read the manual.

Regards
Alex
AntonyP
Posts: 159
Joined: Mon Jan 02, 2006 9:40 am
Location: Athens Greece

Post by AntonyP »

I have configured these 3 tests

a ping test to 10.1.1.1-test a

a ping test to 10.2.1.1-test b

and a ping test to 10.1.1.13-test c

What i would like to do is to trigger test c if either of the a and b tests have %SimpleStatus% NOT UP

Is this the proper expression to use?

('%::test 10.1.1.1::SimpleStatus%'<>"UP") or ('%test 10.2.1.1::SimpleStatus%'<>"UP")

Cause it is not working :(
; ------- Test #1 -------


Method = Ping
;--- Common properties ---
Title = test 10.1.1.1
Comment =
RelatedURL =
ScheduleMode= Regular
Schedule =
Interval = 60
Alerts = Do nothing
ReverseAlert= No
UnknownIsBad= Yes
UseCommonLog= No
PrivLogMode = Default
CommLogMode = Default
;--- Test specific properties ---
Host = 10.1.1.1
Timeout = 2000
Retries = 4
MaxLostRatio= 100
DisplayMode = time


; ------- Test #2 -------


Method = Ping
;--- Common properties ---
Title = test 10.2.1.1
Comment =
RelatedURL =
ScheduleMode= Regular
Schedule =
Interval = 60
Alerts = Do nothing
ReverseAlert= No
UnknownIsBad= Yes
UseCommonLog= No
PrivLogMode = Default
CommLogMode = Default
;--- Test specific properties ---
Host = 10.2.1.1
Timeout = 2000
Retries = 4
MaxLostRatio= 100
DisplayMode = time


; ------- Test #3 -------


Method = Ping
;--- Common properties ---
Title = test
Comment =
RelatedURL =
ScheduleMode= Regular
Schedule =
Interval = 60
Alerts = Do nothing
ReverseAlert= No
UnknownIsBad= Yes
UseCommonLog= No
PrivLogMode = Default
CommLogMode = Default
SyncCounters= Yes
SyncAlerts = No
DependsOn = expression
DpExpression= ('%::test 10.1.1.1::SimpleStatus%'<>"UP") or ('%test 10.2.1.1::SimpleStatus%'<>"UP")
DpOStatus = 'Host is alive'
;--- Test specific properties ---
Host = 10.1.1.13
Timeout = 2000
Retries = 4
MaxLostRatio= 100
DisplayMode = time
By the way, i don't think this post any longer qualifies for the wish list category :wink:
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

You missed :: before test 10.2.1.1

BTW for such simple conditions you may use list of tests instead of expression

Regards
Alex
AntonyP
Posts: 159
Joined: Mon Jan 02, 2006 9:40 am
Location: Athens Greece

Post by AntonyP »

Hi Alex,

Thanks for the tip. I corrected the expression but i am getting Waiting For Master status of the 3rd test while the other two have an UP status, although i have set the 'Host is alive' in the otherwise status field. Is this what i should be getting?
; ------- Test #1 -------


Method = Ping
;--- Common properties ---
Title = test 10.1.1.1
Comment =
RelatedURL =
ScheduleMode= Regular
Schedule =
Interval = 60
Alerts = Do nothing
ReverseAlert= No
UnknownIsBad= Yes
UseCommonLog= No
PrivLogMode = Default
CommLogMode = Default
;--- Test specific properties ---
Host = 10.1.1.1
Timeout = 2000
Retries = 4
MaxLostRatio= 100
DisplayMode = time


; ------- Test #2 -------


Method = Ping
;--- Common properties ---
Title = test 10.2.1.1
Comment =
RelatedURL =
ScheduleMode= Regular
Schedule =
Interval = 60
Alerts = Do nothing
ReverseAlert= No
UnknownIsBad= Yes
UseCommonLog= No
PrivLogMode = Default
CommLogMode = Default
;--- Test specific properties ---
Host = 10.2.1.1
Timeout = 2000
Retries = 4
MaxLostRatio= 100
DisplayMode = time


; ------- Test #3 -------


Method = Ping
;--- Common properties ---
Title = test
Comment =
RelatedURL =
ScheduleMode= Regular
Schedule =
Interval = 60
Alerts = Do nothing
ReverseAlert= No
UnknownIsBad= Yes
UseCommonLog= No
PrivLogMode = Default
CommLogMode = Default
SyncCounters= Yes
SyncAlerts = No
DependsOn = expression
DpExpression= ('%::test 10.1.1.1::SimpleStatus%'<>"UP") or ('%::test 10.2.1.1::SimpleStatus%'<>"UP")
DpOStatus = 'Host is alive'
;--- Test specific properties ---
Host = 10.1.1.13
Timeout = 2000
Retries = 4
MaxLostRatio= 100
DisplayMode = time
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

You forgot about "Synchronize status & alerts" option

Regards
Alex
AntonyP
Posts: 159
Joined: Mon Jan 02, 2006 9:40 am
Location: Athens Greece

Post by AntonyP »

Tried that also, doesn't work :(
I am trying it on both HM 5.70 and 5.38.

Would you like me to re-post the config?
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Remove quotes from OtherwiseStatus option: Host is alive

Regards
Alex
AntonyP
Posts: 159
Joined: Mon Jan 02, 2006 9:40 am
Location: Athens Greece

Post by AntonyP »

Great! Problem solved :D

Thanks alot!
Post Reply