Re: [Nagios-devel] Service Dependency Time Periods

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

Re: [Nagios-devel] Service Dependency Time Periods

Post by Guest »

Shad L. Lords wrote:
>> I've been trying 3.0b7 and have found a discrepancy between the
>> documentation and what actually happens.
>>
>> In the documentation for servicedependency it states:
>>
>> dependency_period: This directive is used to specify the short name of the
>> time period during which this dependency is valid. If this directive is
>> not
>> specified, the dependency is considered to be valid during all times.
>>
>> What actually happens is if you don't define a dependency_period is that
>> the
>> servicedependency is never valid.
>
> I may have jumped the gun a little here. What actually appears to be
> happening is when the service is in a soft state checks are sneaking
> through. It may still be related to time but I'm no longer sure of that.
> What is happening though is the following.
>
> Service B depends on Service A.
> Both are on same host and host is up.
> Service B should dependency is defined with execution check of w,u,c,p.
> Both are in Pending status (clean initial start).
> Service A goes to Unknown.
> Before service A goes to a hard state Service B gets checked.
>
> I would think that with Service A's hard state being either U or P (can you
> have a hard P state?) that service B shouldn't be checked. I originally
> though this was related to timeperiods because when I change timeperiods it
> didn't occur. However by the time I restarted after making the change
> Service A had transitioned to a hard U.
>
> -Shad
>

This is actually proper behavior. By default, Nagios will only use hard
states when checking dependencies. This can be changed with Nagios 3 by
setting the 'soft_state_dependencies=1' option in the main config file.

I just noticed this option isn't in the sample config file, and the docs
are outdated, so I'll get that fixed in CVS shortly.


Ethan Galstad
Nagios Developer
___
Email: [email protected]
Web: www.nagios.org





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked