Conditional test vs test when condition met?

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
frilby
Posts: 15
Joined: Tue Nov 08, 2005 9:39 pm

Conditional test vs test when condition met?

Post by frilby »

I am trying to peform a conditional test like the following:

IF ('%::SERVER1 (CPU TEMPERATURE)::SimpleStatus%'=='DOWN') or ('%::SERVER1 (CPU FAN)::SimpleStatus%'=='DOWN') THEN TEST IS "BAD"

IF ('%::SERVER1 (CPU TEMPERATURE)::SimpleStatus%'=='UP') and ('%::SERVER1 (CPU FAN)::SimpleStatus%'=='UP') THEN TEST IS "GOOD"

I am trying to setup a single notification (with a GOOD and BAD status message) that will trigger on the status of multiple tests (vs having individual messaging for each of the multiple tests).

So (for the example above) instead of getting a message for CPU TEMPERATURE and/or another for CPU FAN, I want to be able to generate a single message for "CPU ENVIRONMENT" for example that would say BAD if either test is BAD and say GOOD when both tests are GOOD.

You can use the "Test depends on expression" condition to control when a test is active, but is there any way of making the ACTUAL TEST to be a check on the status of multiple tests? :roll:

I hope the above makes sense as there is a difference between running a test if certain conditions occur, and testing for certain conditions (and it is the latter that I am trying to do)...

Looking forward to any feedback...

Cheers,
Frilby :wink:
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

I hope the above makes sense as there is a difference between running a test if certain conditions occur, and testing for certain conditions (and it is the latter that I am trying to do)...
Truth to say I do not see big difference.
If you
- setup some test with predefined result (e.g. ping 127.0.0.1)
- select "this test depends on expression" option and use condition ('%::SERVER1 (CPU TEMPERATURE)::SimpleStatus%'=='UP') and ('%::SERVER1 (CPU FAN)::SimpleStatus%'=='UP') to perform the test
- set OtherwiseStatus property to Bad
- and mark "Synchronize status & alerts" option
You will get result that you need (If I understand you correctly).

Regards
Alex
frilby
Posts: 15
Joined: Tue Nov 08, 2005 9:39 pm

Post by frilby »

Alex... Once again you are a GENIUS!

I had tried that combo but could not get the test to stop going into "Wait for Master" but I did not have the "Synchronize status & alerts" checked.. :oops:

Many thanks...

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

Post by KS-Soft »

You are welcome :)

Regards
Alex
Post Reply