Service dependency fun

Assaf Flatto assaf.flatto at ssp-intl.com
Mon Oct 5 12:48:57 CEST 2009



On Friday 02 October 2009 19:35:42 Randy Rodriguez wrote:
> Hey all.  Here's my situation, and my dilemma.  I instituted a check of
> the snmpd process on a group of hosts, all of which do snmp-based checks
> of other services.  I want to institute a dependency such that the snmp
> checks do not notify if the snmpd check fails.  Simple, no?  Here's my
> service dependency cfg:
>
> define servicedependency{
>         hostgroup_name                  all_servers
>         service_description             snmp_svc
>         dependent_service_description   snmp_*
>         execution_failure_criteria      n
>         notification_failure_criteria   c,u
>         }
>
> I've also tried it like this:
>
> define servicedependency{
>         hostgroup_name                  all_servers
>         service_description             snmp_svc
>         dependent_servicegroup_name     snmp_checks
>         execution_failure_criteria      n
>         notification_failure_criteria   c,u
>         }
>
> and both fail in the same way.  The error is
> Error: Could not expand master services specified in service dependency
> (config file '/usr/local/nagios/etc/objects/service_dependencies.cfg',
> starting on line 1)
>
> Clearly I'm missing something.  Any help appreciated.
>
> Nagios 3.0.6, btw.
>
> Thanks,
> -Randy


>From what i can see in your definition , you specified that the dependency is for all your servers , 
but in you explanation of the problem you say that you defined it on a group , in that group is 
called all_servers , that is ok , but if not and you are adding the dependency to a server that 
does not have the snmp checks related to , the load verification will fail .

also in the first example of the definitions , " snmp_*" is not a valid parameter , "*" is a 
standalone all encompassing  declaration  , you'll need to write each service name manually to 
include all snmp checks in to the dependency tree.

Assaf

-- 
Assaf Flatto
SSP Ops Team
Linux System Administrator
169 Euston Road, London, NW1 2AE





More information about the Users mailing list