combine two checks with IF condition?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
akoei
Posts: 8
Joined: Fri Jan 31, 2014 12:04 pm

combine two checks with IF condition?

Post 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
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: combine two checks with IF condition?

Post by tmcdonald »

Are you referring to hosts/services in general or are you asking about writing a plugin and using an IF statement?
Former Nagios employee
akoei
Posts: 8
Joined: Fri Jan 31, 2014 12:04 pm

Re: combine two checks with IF condition?

Post 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.
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: combine two checks with IF condition?

Post 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.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: combine two checks with IF condition?

Post by Box293 »

As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked