Service Dependency Clarification

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
rajasegar
Posts: 1018
Joined: Sun Mar 30, 2014 10:49 pm

Service Dependency Clarification

Post by rajasegar »

Nagios XI 2014R1.2 Ent Edition
27-06-2014 11-23-35 AM.png
I know how the Service Dependency works for the same host or 1 other host with 1 to 1 service dependency.

What is the behavior if I select HostGroup for Manage Hostgroup and Manage Dependent Hostgroup?
You do not have the required permissions to view the files attached to this post.
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Service Dependency Clarification

Post by Box293 »

It can save you having to create lots of individual dependencies.

There are some good examples here:
http://nagios.sourceforge.net/docs/3_0/ ... ricks.html

I think this example says it best:

All Hosts In Multiple Hostgroups:
If you want to create service dependencies for services of the same name/description that are assigned to all hosts in in one or more hostgroups, you can do use the hostgroup_name and/or dependent_hostgroup_name directives. In the example below, service SERVICE2 on all hosts in hostgroups HOSTGROUP3 and HOSTGROUP4 would be dependent on service SERVICE1 on all hosts in hostgroups HOSTGROUP1 and HOSTGROUP2. Assuming there were five hosts in each of the hostgroups, this definition would be equivalent to creating 100 single service dependency definitions! All the instances of the service dependency would be identical except for the host names (i.e. have the same notification failure criteria, etc.).

Code: Select all

define servicedependency{
	hostgroup_name			HOSTGROUP1,HOSTGROUP2
	service_description			SERVICE1
	dependent_hostgroup_name	HOSTGROUP3,HOSTGROUP4
	dependent_service_description	SERVICE2
	other dependency directives ...
	}
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
rajasegar
Posts: 1018
Joined: Sun Mar 30, 2014 10:49 pm

Re: Service Dependency Clarification

Post by rajasegar »

Box293 wrote:It can save you having to create lots of individual dependencies.

There are some good examples here:
http://nagios.sourceforge.net/docs/3_0/ ... ricks.html

I think this example says it best:

All Hosts In Multiple Hostgroups:
If you want to create service dependencies for services of the same name/description that are assigned to all hosts in in one or more hostgroups, you can do use the hostgroup_name and/or dependent_hostgroup_name directives. In the example below, service SERVICE2 on all hosts in hostgroups HOSTGROUP3 and HOSTGROUP4 would be dependent on service SERVICE1 on all hosts in hostgroups HOSTGROUP1 and HOSTGROUP2. Assuming there were five hosts in each of the hostgroups, this definition would be equivalent to creating 100 single service dependency definitions! All the instances of the service dependency would be identical except for the host names (i.e. have the same notification failure criteria, etc.).

Code: Select all

define servicedependency{
	hostgroup_name			HOSTGROUP1,HOSTGROUP2
	service_description			SERVICE1
	dependent_hostgroup_name	HOSTGROUP3,HOSTGROUP4
	dependent_service_description	SERVICE2
	other dependency directives ...
	}
Thanks. Nagios documentation is not as clear as this explanation. :P
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Service Dependency Clarification

Post by tmcdonald »

Thank you Box for the post!

rajasegar, did you have any other questions regarding service dependencies or shall I close this thread?
Former Nagios employee
rajasegar
Posts: 1018
Joined: Sun Mar 30, 2014 10:49 pm

Re: Service Dependency Clarification

Post by rajasegar »

tmcdonald wrote:Thank you Box for the post!

rajasegar, did you have any other questions regarding service dependencies or shall I close this thread?
Please close this thread. Thanks
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
Locked