All Service Dependencies Coming out Duplicates

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

All Service Dependencies Coming out Duplicates

Post 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

}	
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: All Service Dependencies Coming out Duplicates

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
rajasegar
Posts: 1018
Joined: Sun Mar 30, 2014 10:49 pm

Re: All Service Dependencies Coming out Duplicates

Post 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.
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: All Service Dependencies Coming out Duplicates

Post by lmiltchev »

Can you post the "CB_VMWARE_HOST_SM1" hostgroup definition?
Be sure to check out our Knowledgebase for helpful articles and solutions!
rajasegar
Posts: 1018
Joined: Sun Mar 30, 2014 10:49 pm

Re: All Service Dependencies Coming out Duplicates

Post 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.
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: All Service Dependencies Coming out Duplicates

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
rajasegar
Posts: 1018
Joined: Sun Mar 30, 2014 10:49 pm

Re: All Service Dependencies Coming out Duplicates

Post 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.
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: All Service Dependencies Coming out Duplicates

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: All Service Dependencies Coming out Duplicates

Post by lmiltchev »

@rajasegar

Update: The bug has been fixed in 5R1.0 (Nagios Core Version 4.1.1). Thank you!
Be sure to check out our Knowledgebase for helpful articles and solutions!
rajasegar
Posts: 1018
Joined: Sun Mar 30, 2014 10:49 pm

Re: All Service Dependencies Coming out Duplicates

Post by rajasegar »

Ok. I almost forgot about this.
Thanks

Please close this case.
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
Locked