Hello,
We have been working on configuring several Hosts dependencies in our infraestructure, but seems not to be working properly, or as we expected to be.
This is our currently set up for a Host dependency:
And in order to check if the configurtation of all the dependencies had been configured properly, we forced HOST A to be unreachable, so all other hosts shouldn't be appearing as Unhandled hosts, right?
As soon as HOST A becomes unreachable, we get the following:
But what we really want is to happen the following:
How we need to configure the Host Dependency in order to prevent all the Host appering on the Operations Screen as Unhandled Hosts Problems?
Thanks in advance and best regards,
J.
Configuring Nagios Hosts Dependencies
Configuring Nagios Hosts Dependencies
You do not have the required permissions to view the files attached to this post.
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Configuring Nagios Hosts Dependencies
What version of Nagios XI are you using?
Can you go into CCM and for the host dependency please click the disk icon and paste the text config here.
Can you go into CCM and for the host dependency please click the disk icon and paste the text config here.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Configuring Nagios Hosts Dependencies
Hi there Box,
Thanks for your reply. Please, find hereunder the Host Dependencies.
Just for more information and taking an example
For this Host: VPN_BPSJ (which is a monitorized VPN), if drops, the following hosts (bd_bpsj,bpsj1.bpsj.intranet,bpsj2.bpsj.intranet) shouldn't be neither notified nor shown in the Undhandled Host problems screen.
This is the definied Host Dependency for the taken example:
Regards,
J.
Thanks for your reply. Please, find hereunder the Host Dependencies.
Code: Select all
###############################################################################
#
# Host dependency configuration file
#
# Created by: Nagios Core Config Manager 2.5.1
# Date: 2015-12-01 17:32:25
# Version: Nagios 3.x config file
#
# --- DO NOT EDIT THIS FILE BY HAND ---
# Nagios CCM will overwrite all manual settings during the next update if you
# would like to edit files manually, place them in the 'static' directory or
# import your configs into the CCM by placing them in the 'import' directory.
#
###############################################################################
define hostdependency {
# config_name Dependencias_VPN_BCA
dependent_host_name bca1.bca.intranet,bca2.bca.intranet
host_name VPN_BCA
inherits_parent 1
execution_failure_criteria n,
notification_failure_criteria u,d,
dependency_period 24x7
}
define hostdependency {
# config_name Dependencias_VPN_BCL
dependent_host_name bd_bclh
host_name VPN_BCL
inherits_parent 1
execution_failure_criteria n,
notification_failure_criteria u,d,
dependency_period 24x7
}
define hostdependency {
# config_name Dependencias_VPN_BJA
dependent_host_name bja1.bja.intranet,bja2.bja.intranet
host_name VPN_BJA
inherits_parent 1
execution_failure_criteria n,
notification_failure_criteria u,d,
dependency_period 24x7
}
define hostdependency {
# config_name Dependencias_VPN_BPC
dependent_host_name bd_pcgp,bd_rdo,bpc1.bpc.intranet,bpc2.bpc.intranet
host_name VPN_BPC
inherits_parent 0
execution_failure_criteria u,d,
notification_failure_criteria u,d,
dependency_period 24x7
}
define hostdependency {
# config_name Dependencias_VPN_BPO
dependent_host_name bd_bpo,bpo1.bpo.intranet,bpo2.bpo.intranet
host_name VPN_BPO
inherits_parent 1
execution_failure_criteria n,
notification_failure_criteria u,d,
dependency_period 24x7
}
define hostdependency {
# config_name Dependencias_VPN_BPRO
dependent_host_name bd_bpro
host_name VPN_BPRO
inherits_parent 1
execution_failure_criteria n,
notification_failure_criteria u,d,
dependency_period 24x7
}
define hostdependency {
# config_name Dependencias_VPN_BPSJ
dependent_host_name bd_bpsj,bpsj1.bpsj.intranet,bpsj2.bpsj.intranet
host_name VPN_BPSJ
inherits_parent 1
execution_failure_criteria n,
notification_failure_criteria u,d,
dependency_period 24x7
}
define hostdependency {
# config_name Dependencias_VPN_BSF
dependent_host_name bd_bsf,bsf.bsf.intranet
host_name VPN_BSF
inherits_parent 1
execution_failure_criteria n,
notification_failure_criteria u,d,
dependency_period 24x7
}
###############################################################################
#
# Host dependency configuration file
#
# END OF FILE
#
###############################################################################
For this Host: VPN_BPSJ (which is a monitorized VPN), if drops, the following hosts (bd_bpsj,bpsj1.bpsj.intranet,bpsj2.bpsj.intranet) shouldn't be neither notified nor shown in the Undhandled Host problems screen.
This is the definied Host Dependency for the taken example:
Code: Select all
define hostdependency {
# config_name Dependencias_VPN_BPSJ
dependent_host_name bd_bpsj,bpsj1.bpsj.intranet,bpsj2.bpsj.intranet
host_name VPN_BPSJ
inherits_parent 1
execution_failure_criteria n,
notification_failure_criteria u,d,
dependency_period 24x7
}
Regards,
J.
Re: Configuring Nagios Hosts Dependencies
That example will only stop notifications - the dependent hosts will still be checked. From the documentation regarding execution_failure_criteria:
If you specify n (none) as an option, the execution dependency will never fail and the dependent host will always be actively checked
Former Nagios employee
Re: Configuring Nagios Hosts Dependencies
That's interesting, what is the default, expected behaviour (d,u?)?
How do I change that (so the database doesn't overwrite that)?
How do I change that (so the database doesn't overwrite that)?
Re: Configuring Nagios Hosts Dependencies
You can select whatever "Execution failure criteria" option you need in the CCM (under the "Host Dependency Management). Save and apply configuration.
Here's our documentation on the execution failure criteria options:
Here's our documentation on the execution failure criteria options:
Hope this helps.Hostdependency - execution failure criteria
This directive is used to specify the criteria that determine when the dependent host should not be actively checked. If the master host is in one of the failure states we specify, the dependent host 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 UP state,
d = fail on a DOWN state,
u = fail on an UNREACHABLE state, and
p = fail on a pending state (e.g. the host has not yet been checked).
If you specify n (none) as an option, the execution dependency will never fail and the dependent host will always be actively checked (if other conditions allow for it to be).
Example: If you specify u,d in this field, the dependent host will not be actively checked if the master host is in either an UNREACHABLE or DOWN state.
Parameter name: execution_failure_criteria
Required: no
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Configuring Nagios Hosts Dependencies
My host dependencies are empty.
Thus I have ~100 hosts which all have their parents set.
So how does this affect the child-parents relations?
Or is this something completely else?
Thus I have ~100 hosts which all have their parents set.
So how does this affect the child-parents relations?
Or is this something completely else?
Re: Configuring Nagios Hosts Dependencies
I apologize, can your explain a bit more on what you mean when you say your host dependencies are empty?
When you have a parent/child relationship the children will become unknown but still perform the checks, it just won't notify if you don't have unknown/unreachable notifications enabled.
With dependencies you have the ability to have it not check/not notify.
Thank you
When you have a parent/child relationship the children will become unknown but still perform the checks, it just won't notify if you don't have unknown/unreachable notifications enabled.
With dependencies you have the ability to have it not check/not notify.
Thank you
Re: Configuring Nagios Hosts Dependencies
So what You mean is that the host/child relationship is something separate to the dependencies, right?