Service Dependency Time Periods

Ethan Galstad nagios at nagios.org
Fri Dec 14 19:07:34 CET 2007


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: nagios at nagios.org
Web:   www.nagios.org

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace




More information about the Developers mailing list