Page 1 of 1

Service Dependency not working

Posted: Wed Sep 17, 2014 9:42 pm
by Fred Kroeger
I've got some Service Dependencies setup which used to work, however after a Power Loss at a site last night, I have discovered that it no longer works as expected.
We are running NagiosXI 2014 R1.4 but it could have broken with previous versions?

The Service Depenedency I have setup should stop any alerts for Domino Web Interface check if the Check Domino Server or Domino Notes Interface services are down.

Code: Select all

define servicedependency {
       dependent_hostgroup_name                 Applications Domino Mail Servers
       dependent_service_description            Domino Web Interface
       hostgroup_name                           Applications Domino Mail Servers
       service_description                      Check Domino Server,Domino Notes Interface
       inherits_parent                          1
       execution_failure_criteria               u,c,p,
       notification_failure_criteria            u,c,p,
       dependency_period                        24x7
}
This did not happen last night and I received alerts and notifications for all the service checks as follows:

Code: Select all

2014-09-17 23:31:16 SERVICE ALERT: HOSTNAME;Domino Notes Interface;CRITICAL;HARD;4;CRITICAL - Socket timeout after 10 seconds
2014-09-17 23:31:16 SERVICE NOTIFICATION: Messaging;HOSTNAME;Domino Notes Interface;CRITICAL;Email-service-event;CRITICAL - Socket timeout after 10 seconds

2014-09-17 23:33:06 SERVICE ALERT: HOSTNAME;Check Domino Server;CRITICAL;HARD;5;FPING CRITICAL - X.X.X.X (loss=100% )
2014-09-17 23:33:06 SERVICE NOTIFICATION: Messaging;HOSTNAME;Check Domino Server;CRITICAL;Email-service-event;FPING CRITICAL - X.X.X.X (loss=100% )

2014-09-17 23:35:52 SERVICE ALERT: HOSTNAME;Domino Web Interface;CRITICAL;HARD;4;connect to address X.X.X.X and port 80: No route to host
2014-09-17 23:35:52 SERVICE NOTIFICATION: Messaging;HOSTNAME;Domino Web Interface;CRITICAL;Email-service-event;connect to address X.X.X.X and port 80: No route to host

The Web Interface check failed over 2minutes after the other checks, so the notifications should have been suppressed.
Is anyone able to confirm that Service Dependencies are working with 2014R1.4 ?

regards... Fred

Re: Service Dependency not working

Posted: Thu Sep 18, 2014 4:48 pm
by lmiltchev
Fred, can you PM us the profile.zip? We would like to look at your configs as we were not able to recreate this problem in house.

Re: Service Dependency not working

Posted: Fri Sep 19, 2014 4:01 pm
by lmiltchev
Just to give you heads up. I was not able to recreate the issue and didn't see anything weird in the configs. Service dependencies worked as expected on my test box (Nagios XI 2014R1.4). Troy is also going to give it a try, and we will get back to you later today or tomorrow.

Re: Service Dependency not working

Posted: Mon Sep 22, 2014 4:23 pm
by Box293
Just an update, we have been doing some testing on this and will continue on it tomorrow. Just wanted to let you know we haven't forgotten your issue.

Re: Service Dependency not working

Posted: Tue Sep 23, 2014 2:42 pm
by Box293
Hi Fred,
It does appear that you've identified a bug in Core 4.0.8.

I was able to replicate your issue on a Nagios XI 2014 R1.4 machine (which runs core 4.0.8).

I also spun up a core 4.0.8 machine and was able to replicate the issue on it.

When I spun up a core 3.5.1 machine the behavior worked as expected.

What I observed:
When hostgroups are used for the hostgroup_name directive, they service dependency appears to be ignored. This does not matter if the host's are assigned to the hostgroup via their host object definition OR inside the hostgroup definition.


Workaround:
Annoying as it is, specify the individual hosts in the service dependency using the host_name directive. When this is done the service dependency works as expected.

We will file an internal bug report.

Re: Service Dependency not working

Posted: Tue Sep 23, 2014 7:04 pm
by Fred Kroeger
Thanks for looking at this Troy and for the workaround - much appreciated!

Re: Service Dependency not working

Posted: Tue Sep 23, 2014 7:31 pm
by Box293
No problems :)

FYI Here's the bug report on GitHub
https://github.com/NagiosEnterprises/na ... /issues/19

Re: Service Dependency not working

Posted: Tue Aug 18, 2015 7:13 pm
by Box293
Fred,
I can confirm that this bug has been fixed in Nagios Core 4.1.0.

When Core 4.1.0 gets integrated into Nagios XI your original problem will be resolved.