Define service dependencies for all services checked by NRPE

Tobias Mucke tobias.mucke at googlemail.com
Sun May 18 18:58:53 CEST 2008


Hi list,

I use service dependencies to define that all service checks checked
by NRPE depend on the NRPE daemon. Actually I am using a very
time-consuming approach by defining all dependencies explicitely.
Please note: I call the service implementing the NRPE protocol
regardless on which platform it is running nagios-agent.

Actuall approach is already using same host service dependencies:

define servicedependency {
   host_name   mypc
   service_description   nagios-agent
   dependent_service_description   load, mem, syslog
   execution_failure_criteria   n
   notification_failure_criteria   c,u
}

This is time-consuming because I have to define such a dependency for
every host and if I introduce a new check checked by NRPE I have to
alter all dependency definitions. After reading the Nagios
documentation about "time saving tricks" I tried to use hostgroups in
service dependency definitions. This works fine and eliminates the
first problem. I just defined one dependency for all hosts in a
hostgroup.

define servicedependency {
   hostgroup_name   sles-10-base-prod
   service_description   nagios-agent
   dependent_service_description   load, mem, syslog
   execution_failure_criteria   n
   notification_failure_criteria   c,u
}

This means I have to define a dependency for every hostgroup which
relies on services checked by NRPE. But these definitions still have
to be altered if there is a new check using NRPE.

So I had the idea to add all services checked by NRPE to a service
group called nagios-agent-based.Then I tried to define a same host
dependency.

define servicedependency {
   hostgroup_name   sles-10-base-prod
   service_description   nagios-agent
   dependent_servicegroup_name   nagios-agent-based
   execution_failure_criteria   n
   notification_failure_criteria   c,u
}

But this did not work like expected, because now there are not only
same host dependencies defined but all service checks on one host
relies now on every nagios-agent on every host in the hostgroup. Works
as designed? From my understanding I expected something else.

Any other ideas to define such dependencies?

Thanks for your advice.

Tobias

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/




More information about the Developers mailing list