Page 1 of 1
combine two checks with IF condition?
Posted: Fri Mar 06, 2015 11:02 am
by akoei
Is there a way can combine two check A and B with IF condition?
IF check A true, then check B
Thanks a lot
Re: combine two checks with IF condition?
Posted: Fri Mar 06, 2015 11:09 am
by tmcdonald
Are you referring to hosts/services in general or are you asking about writing a plugin and using an IF statement?
Re: combine two checks with IF condition?
Posted: Fri Mar 06, 2015 11:19 am
by akoei
tmcdonald wrote:Are you referring to hosts/services in general or are you asking about writing a plugin and using an IF statement?
I am looking forward a ganeral way. Our requirement is:
Check A, if A is true, then check B, then send out notification based on B; if A is false, stop.
I couldn't combine them now have to have two individual checks which are not satisified by business.
Of course if there is a plugin with IF statement make it work, I will be happy, but unless the plug-in can call other service check otherwise it would be hard to implement.
Re: combine two checks with IF condition?
Posted: Fri Mar 06, 2015 12:50 pm
by jdalrymple
We might need a better description of the real world application to help. At first glance my guess is that a custom plugin would be the proper route to go. Another possibility depending on that real world application would be to use an Event Handler to kick off a passive service check upon failure of A. Without specifics thought it's hard to be certain if that would work.
There is no built in logic system to achieve what you're trying to do ... no. Also you cannot use the interactions of one service to modify the status of another service without some custom event handlers. Those are the constraints. Those constraints should be fairly easy to work around and achieve what you want nonetheless.
Re: combine two checks with IF condition?
Posted: Sun Mar 08, 2015 8:00 pm
by Box293