Page 1 of 1

All Service Dependencies Coming out Duplicates

Posted: Wed Sep 03, 2014 5:33 am
by rajasegar
Nagios XI 2014R1.2
RHEL 6.5 64Bit

I just noticed that all the service dependencies is showing up as duplicates in objects.cache.
See sample below.

There is no duplicate service definitions in CCM.

Extract from objects.cache

Code: Select all

define servicedependency {
        host_name       esbwasp01
        service_description     Thread: WebContainer
        dependent_host_name     esbwasp01
        dependent_service_description   Thread: TCPChannel.DCS
        dependency_period       24x7
        inherits_parent 1
        notification_failure_options    u,c
        }

define servicedependency {
        host_name       esbwasp01
        service_description     Thread: WebContainer
        dependent_host_name     esbwasp01
        dependent_service_description   Thread: TCPChannel.DCS
        dependency_period       24x7
        inherits_parent 1
        execution_failure_options       u,c
        }


define servicedependency {
        host_name       esbwasp02
        service_description     Thread: WebContainer
        dependent_host_name     esbwasp02
        dependent_service_description   Thread: TCPChannel.DCS
        dependency_period       24x7
        inherits_parent 1
        notification_failure_options    u,c
        }

define servicedependency {
        host_name       esbwasp02
        service_description     Thread: WebContainer
        dependent_host_name     esbwasp02
        dependent_service_description   Thread: TCPChannel.DCS
        dependency_period       24x7
        inherits_parent 1
        execution_failure_options       u,c
        }
Extract from CCM

Code: Select all

define servicedependency {
       dependent_service_description 		Thread: TCPChannel.DCS
       host_name                     		esbwasp01,esbwasp02
       service_description           		Thread: WebContainer
       inherits_parent               		1
       execution_failure_criteria    		u,c,
       notification_failure_criteria 		u,c,
       dependency_period             		24x7

}	

Re: All Service Dependencies Coming out Duplicates

Posted: Wed Sep 03, 2014 11:13 am
by lmiltchev
It seems like this is a default behavior. It has nothing to do with Nagios XI - it's a Nagios Core thing. The file is split as these are different dependencies ("notification_failure_options" & "execution_failure_options").
define servicedependency {
host_name esbwasp02
service_description Thread: WebContainer
dependent_host_name esbwasp02
dependent_service_description Thread: TCPChannel.DCS
dependency_period 24x7
inherits_parent 1
notification_failure_options u,c
}

define servicedependency {
host_name esbwasp02
service_description Thread: WebContainer
dependent_host_name esbwasp02
dependent_service_description Thread: TCPChannel.DCS
dependency_period 24x7
inherits_parent 1
execution_failure_options u,c
}
BTW, the same behavior is observed with host dependencies. It is expected behavior.

Re: All Service Dependencies Coming out Duplicates

Posted: Wed Sep 03, 2014 6:20 pm
by rajasegar
Ok. What about the one below?

The idea is every host in the hostgroup must check VMH Storage Usage and execute VMH Runtime Info only if it is not in Unknown state.

Code: Select all

define servicedependency {
       dependent_hostgroup_name      		CB_VMWARE_HOST_SM1
       dependent_service_description 		VMH Storage Usage
       hostgroup_name                		CB_VMWARE_HOST_SM1
       service_description           		VMH Runtime Info
       inherits_parent               		1
       execution_failure_criteria    		u,
       notification_failure_criteria 		u,

}	
However what it ends up with is, only I host is used for host_name and the rest not used.
Dependent_host_name uses every single host in the hostgroup as expected.

Code: Select all

define servicedependency {
        host_name       NIMBUS
        service_description     VMH Runtime Info
        dependent_host_name     BHQCYBESXIP01
        dependent_service_description   VMH Storage Usage
        inherits_parent 1
        notification_failure_options    u
        }

define servicedependency {
        host_name       NIMBUS
        service_description     VMH Runtime Info
        dependent_host_name     BHQCYBESXIP01
        dependent_service_description   VMH Storage Usage
        inherits_parent 1
        execution_failure_options       u
        }

define servicedependency {
        host_name       NIMBUS
        service_description     VMH Runtime Info
        dependent_host_name     BHQCYBESXIP02
        dependent_service_description   VMH Storage Usage
        inherits_parent 1
        notification_failure_options    u
        }

define servicedependency {
        host_name       NIMBUS
        service_description     VMH Runtime Info
        dependent_host_name     BHQCYBESXIP02
        dependent_service_description   VMH Storage Usage
        inherits_parent 1
        execution_failure_options       u
        }

define servicedependency {
        host_name       NIMBUS
        service_description     VMH Runtime Info
        dependent_host_name     BHQCYBESXIP03
        dependent_service_description   VMH Storage Usage
        inherits_parent 1
        notification_failure_options    u
        }

define servicedependency {
        host_name       NIMBUS
        service_description     VMH Runtime Info
        dependent_host_name     BHQCYBESXIP03
        dependent_service_description   VMH Storage Usage
        inherits_parent 1
        execution_failure_options       u
        }

The same thing repeats for every host in the hostgroup but host_name is the same in all.

Re: All Service Dependencies Coming out Duplicates

Posted: Thu Sep 04, 2014 10:39 am
by lmiltchev
Can you post the "CB_VMWARE_HOST_SM1" hostgroup definition?

Re: All Service Dependencies Coming out Duplicates

Posted: Thu Sep 04, 2014 6:02 pm
by rajasegar
lmiltchev wrote:Can you post the "CB_VMWARE_HOST_SM1" hostgroup definition?

Code: Select all

define hostgroup {
	hostgroup_name                		CB_VMWARE_HOST_SM1
	alias                         		Wintel VmWare Host SM1
	members                       		BHQCYBESXIP01,BHQCYBESXIP02,BHQCYBESXIP03,BHQCYBESXIP04,BHQKPKESXI001,BHQKPKESXI002,BHQKPKESXI003,BHQKPKESXI005,BHQKPKESXI007,BHQKPKESXI008,BHQKPKESXI009,BHQKPKESXI010,BHQKPKESXI011,BHQKPKESXI012,BHQKPKESXI013,BHQKPKESXI014,BHQKPKESXI017,BHQKPKESXI018,BHQKPKESXI019,BHQKPKESXI020,BHQKPKESXI023,BHQKPKESXI024,BHQMBCESXI003,BHQMBCESXI004,BHQMBCESXI005,BHQPDM000315,BHQPDMESXI000011,BHQPDMESXI000014,BHQPDMESXI000115,BHQPDMESXI000119,BHQPDMESXI010,BHQPDMESXIP01,BHQPDMESXIP02,BHQPDMESXIP03,BHQPDMESXIP04,BHQPDMESXIP05,BHQPDMESXIP06,BHQPDMESXIP07,BHQPDMESXIP11,BHQPDMESXIP12,BHQPDMESXiP13,BHQPDMESXiP16,BHQPDMESXiP17,BHQPDMESXIU01,BHQPDMESXIU02,BHQPDMESXIU03,BHQPDMESXIU04,BHQPDMESXIU05,BHQPDMESXIU06,BHQPDMESXIU07,BHQPDMESXIU08,BHQPDMESXIU09,ESXSERVER2,MBCSVR0103,MBCSVR0104,MY1PWDEV1,MY1PWSIT1,MY1PWSIT2,MY1PWSIT3,MY1PWSIT4,MY1PWSIT5,MY1PWSIT6,NIMBUS
It only uses the very last host as hostname for the service dependencies.

Re: All Service Dependencies Coming out Duplicates

Posted: Fri Sep 05, 2014 10:50 am
by lmiltchev
The "host_name" directive identifies the host that the "master" service runs on or is associated with. Does "VMH Runtime Info" run on all hosts, members of "CB_VMWARE_HOST_SM1"? I mean, is it defined in each service config individually, or you added the service to the hostgroup? I would like to test this scenario.

Re: All Service Dependencies Coming out Duplicates

Posted: Sun Sep 07, 2014 10:08 pm
by rajasegar
lmiltchev wrote:The "host_name" directive identifies the host that the "master" service runs on or is associated with. Does "VMH Runtime Info" run on all hosts, members of "CB_VMWARE_HOST_SM1"? I mean, is it defined in each service config individually, or you added the service to the hostgroup? I would like to test this scenario.
The VMH Runtime Info is defined once and the hostgroup CB_VMWARE_HOST_SM1 is assigned to it.

Re: All Service Dependencies Coming out Duplicates

Posted: Mon Sep 08, 2014 11:31 am
by lmiltchev
You are correct. I was able to recreate the issue, but it has nothing to do with Nagios XI. It seems like this is a Nagios Core bug. I already submitted an internal Nagios Core bug report (TASK ID 3948). With the upcoming conference, it may take some time before our developers get to it.

Re: All Service Dependencies Coming out Duplicates

Posted: Mon Oct 05, 2015 11:23 am
by lmiltchev
@rajasegar

Update: The bug has been fixed in 5R1.0 (Nagios Core Version 4.1.1). Thank you!

Re: All Service Dependencies Coming out Duplicates

Posted: Mon Oct 05, 2015 6:16 pm
by rajasegar
Ok. I almost forgot about this.
Thanks

Please close this case.