Host Dependency on service

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
gaurangmaru
Posts: 11
Joined: Thu Jun 02, 2016 1:35 am

Re: Host Dependency on service

Post by gaurangmaru »

Hi Thank you for response.

Does it mean, I can use parent directive for host to host or service to service not with host to service or service to host. If yes, please help me with any other work around since I do not want to open specific port on device(switch) just for this parent check as service.



Regards,
Gaurang
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Host Dependency on service

Post by cdienger »

parents can only be used on a service to service or host to host relationship.

Service dependency can be used instead to do what you're looking for. https://assets.nagios.com/downloads/nag ... dependency. You'd need to set up a service that checks to see if the host is up and then make the snmp service check dependent on it. Something like:

define service{
host_name 1001101004
service_description checkhost
check_command check-host-alive
max_check_attempts 1
retry_interval 1
check_interval 1
check_period 24x7
}

define servicedependency{
dependent_host_name 1001101004
dependent_service_description Firmware Version
host_name 1001101004
service_description checkhost
execution_failure_criteria c
}
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked