Page 1 of 1

Dependency creation

Posted: Wed Jun 28, 2017 10:35 am
by sgoffar
Hi Team,

We want to create a Dependency for attached architecture. Scenario is if the Host A is down it will create Events only for Host A down. Will not create any events for Host B,Host C Host D.

Can you please help on this.

Re: Dependency creation

Posted: Wed Jun 28, 2017 3:36 pm
by tgriep
I do have a question for you, when you ask "Will not create any events for Host B,Host C Host D" do you mean that when Host A is down that you do not want to receive email notifications for the other hosts or that you want to stop the checks from running and the email notifications from running?

If you only want to stop the email notifications, then you could setup a Parent / Child relationship.
To do this, you would edit the host configuration for b,c,d and e and add the Host A as a parent by clicking on the Manage Parents button, and adding Host A to it.
That way, when Nagios detects that Host A is down, it will stop sending email Alerts for host b,c,d,e.
For more details on how this works, take a look at this link.
https://assets.nagios.com/downloads/nag ... ility.html


If you want the host / service checks to stop being run on hosts b,c,d,e when Host A is down, you would have to setup a Service Dependency.

To do this, you would have to have one service check defined for Host A, a check_ping would work for this.
Then you would create a Service Dependency and add Host A under the Manage Host button and the Ping for that host, would go under the Manage Service button.

Add Hosts b,c,d,e under the Manage Dependent Hosts button and all of the services under the Manage Service Dependencies button.

For the execution failure criteria, take a look a the following for those options.

This directive is used to specify the criteria that determine when the dependent service should not be actively checked. If the master service is in one of the failure states we specify, the dependent service will not be actively checked. Valid options are a combination of one or more of the following (multiple options are separated with commas):
o = fail on an OK state,
w = fail on a WARNING state,
u = fail on an UNKNOWN state,
c = fail on a CRITICAL state, and
p = fail on a pending state (e.g. the service has not yet been checked).
If you specify n (none) as an option, the execution dependency will never fail and checks of the dependent service will always be actively checked (if other conditions allow for it to be).

Example: If you specify o,c,u in this field, the dependent service will not be actively checked if the master service is in either an OK, a CRITICAL, or an UNKNOWN state.

If you want more details on how Service Dependencies work, take a look at this link.
https://assets.nagios.com/downloads/nag ... ncies.html

Re: Dependency creation

Posted: Fri Jun 30, 2017 8:07 am
by sgoffar
Thanks for quick reply. Actually our Nagios is integrated with evanios event monitoring tools.
So we want the event not to create for Host B,Host C,HostD in case of HostA down.

We are using Nagios Xi 5.4.2. I have already Implemented the Ping service dependency of Host A to all services of host B,Host C and Host D.

But as the Host down to service event correlation already implemented so, Ping service of Host A is not executing at all once Host A is down.

I have attached the test result also.

Re: Dependency creation

Posted: Fri Jun 30, 2017 10:06 am
by tgriep
I don't understand what you mean by "event not to create ", can you provide more details on that?

Re: Dependency creation

Posted: Mon Jul 03, 2017 2:48 am
by sgoffar
I mean execution to be stop for dependent host/services.

Re: Dependency creation

Posted: Wed Jul 05, 2017 8:30 am
by tgriep
I understand what you mean now. Setting the execution failure criteria to "c = fail on a CRITICAL state" will stop the checks on the Dependent hosts/services when the Master Host is in a critical State.