Is there a way can combine two check A and B with IF condition?
IF check A true, then check B
Thanks a lot
combine two checks with IF condition?
Re: combine two checks with IF condition?
Are you referring to hosts/services in general or are you asking about writing a plugin and using an IF statement?
Former Nagios employee
Re: combine two checks with IF condition?
I am looking forward a ganeral way. Our requirement is:tmcdonald wrote:Are you referring to hosts/services in general or are you asking about writing a plugin and using an IF statement?
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?
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.
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.
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: combine two checks with IF condition?
Have a look at check_multi:
http://exchange.nagios.org/directory/Pl ... ti/details
Another option is BPI:
http://assets.nagios.com/downloads/nagi ... _Addon.pdf
http://exchange.nagios.org/directory/Pl ... ti/details
Another option is BPI:
http://assets.nagios.com/downloads/nagi ... _Addon.pdf
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.