Page 1 of 2

Dependency not working

Posted: Tue Jun 02, 2015 9:06 am
by BanditBBS
Here is my dependency config file:

Code: Select all

define servicedependency {
       dependent_hostgroup_name                 PICO_NH-365-Servers,PICO_NH-CHI-Servers,PICO_NH-Linux,PICO_NH-Non-Prod-Servers,PICO_NH-Prod-Servers,PICO_NH-Windows
       dependent_service_description            *
       host_name                                robot-pico
       service_description                      *
       inherits_parent                          1
       execution_failure_criteria               w,u,c,
       notification_failure_criteria            w,u,c,
       dependency_period                        xi_timeperiod_24x7

}
On robot-pico there is a ping service. I am wanting when that fails to stop any alerts and even checks for ANY service on ANY PICO server. That isn't happening. That service went critical yesterday and checks continued and alerts continued for every host/service for PICO. What's wrong with my config? Is it the wildcard on the service description? Its a valid choice in the UI, so I'd hope that isn't it, but if it is, I can change that.

Re: Dependency not working

Posted: Tue Jun 02, 2015 9:10 am
by eloyd
I've never known wildcard dependencies to work properly, even though it states that it should. In fact, somewhere, I opened an incident on this a year ago but I don't think any progress got made, since it was a rather obscure usage.

Also, not sure, but you have commas at the end of the failure lines - try removing those dangling commas. I don't think it matters, but it might.

Lastly, I think you're in the wrong forum. :)

Re: Dependency not working

Posted: Tue Jun 02, 2015 9:13 am
by BanditBBS
eloyd wrote:I've never known wildcard dependencies to work properly, even though it states that it should. In fact, somewhere, I opened an incident on this a year ago but I don't think any progress got made, since it was a rather obscure usage.

Also, not sure, but you have commas at the end of the failure lines - try removing those dangling commas. I don't think it matters, but it might.

Lastly, I think you're in the wrong forum. :)
OMG - Woops, someone move this :)

Also, that file is auto written, I have no control over trailing commas

EDIT #1:

Also, this is similar to how I have configured escalations in the past with wildcards and they worked fine. Hoping I only have to change the "service_description" wildcard and can keep the other.

Re: Dependency not working

Posted: Tue Jun 02, 2015 9:23 am
by eloyd
Yah, I figured about the danglers. I was just grasping at straws. It's been a while since I delved into XI's generated configs.

Re: Dependency not working

Posted: Tue Jun 02, 2015 10:01 am
by BanditBBS
So, I removed the dependent_hostgroup and added instead the separate hosts in dependent_host_name and bam, its working.

Re: Dependency not working

Posted: Tue Jun 02, 2015 10:05 am
by eloyd
Yah, this is basically the same problem I reported in http://support.nagios.com/forum/viewtop ... =7&t=28200, which I was hopeful would be fixed before last year's conference. It was not.

Oh, Andy?????

Re: Dependency not working

Posted: Tue Jun 02, 2015 12:37 pm
by lmiltchev
So, I removed the dependent_hostgroup and added instead the separate hosts in dependent_host_name and bam, its working.
This would be the workaround until the bug is fixed. I realize it is taking a long time (I filed an internal bug report on 2014-09-08; task ID=3948 and it hasn't been fixed yet) but this is not a "priority" project, so I am not sure when this is going to be fixed.

Re: Dependency not working

Posted: Tue Jun 02, 2015 12:49 pm
by eloyd
My offer from last year still stands - free beer or dark liquor to the person who fixes it if it's done prior to September 28th. :-)

Re: Dependency not working

Posted: Tue Jun 02, 2015 1:02 pm
by BanditBBS
Yeah, pretty big issue...whats the point of using hostgroups then. Now I have to start a new list of things I have to verify when adding new monitored hosts...adds a new level of possible human error :(

Re: Dependency not working

Posted: Tue Jun 02, 2015 2:39 pm
by lmiltchev
BanditBBS, there is a patch submitted that *should* fix the dependencies issues.

http://tracker.nagios.org/view.php?id=641

Sean tested it and it seemed to work, however it hasn't been tested thoroughly. Our devs need to take a look at it and see if this is not going to break something else. Anyway, as usual, if you decide to give it a try - don't test in production. :)