Please always respond on list so that others may learn from your  
experience. More below...

On Jan 26, 2009, at 7:20 PM, Owen LaGarde wrote:

>> How do you think it would alter the check behavior? Are you sure  
>> about
>> that?
>
> ... by causing a given service check to not fire because it's  
> dependencies
> are not met.  At least that's what it did when I tried it, and my  
> read of
> the docs is that this behavior is precisely what servicedependencies  
> and
> hostdependencies are for -- to alter the firing of checks based on  
> other
> checks' output, not to alter behavior of [non-sub-]processes  
> launched as a
> result of check failure, based on other checks' output.

http://nagios.sourceforge.net/docs/3_0/dependencies.html - See the  
examples and "Execution Dependencies"

You have two configurables. notification_failure_criteria and  
execution_failure_criteria. The first controls when notifications  
should go out and the last when the service checks for the dependent  
service should still be executed. This last can be set to 'n' to  
continue to run dependent service checks regardless of the status of  
the service being depended upon.


>> As far as doubling your config, it certainly doesn't have to if  
>> you're
>> smart about it. I think a servicegroup in the template + 1 dependency
>> might be all you need. I can't say for sure since I don't use
>> dependencies but the it looks workable from the documentation...
>
> Doesn't the documentation indicate that a servicedependency  
> definition must have
> the host and service fields populated (though the -dependent forms  
> can be left
> blank ala' wildcard inheritance)?  Of course I tried this route, I'm  
> not a
> *complete* idiot.  Ok, at least not often.  8-P`   When I left  
> either host or
> service blank nagios complained about an incomplete  
> servicedependency clause.

You may have tried this. My understanding is that you have a single  
service check (call it tgt-service) running on a single host (call it  
tgt-host). A bunch of services on many hosts depend on this being OK.  
You want the notifications to be suppressed if it's not OK but the  
checks to still continue regardless of it's status.

I would approach it as follows. For each service that has this  
dependency, add it to a servicegroup --

define service {
        host_name       remote-host
        service_description     remote-service
        check_command           check_remote ...
        servicegroups           d_service
        ...
}

You may have a template that you already use for those services and  
can make the change in only one place. Then, define a service  
dependency that applies to the entire servicegroup --

define servicedependency{
        host_name                       tgt-host
        service_description             tgt-service
        dependent_servicegroup_name     d_service
        execution_failure_criteria      n
        notification_failure_criteria   w,u,c,p
        }

Again, I don't use service dependencies but this looks like the way to  
do it.


--
Marc


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Nagios-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null

Reply via email to