Page 1 of 1

Re: [Nagios-devel] Mass define servicedependency for NRPE services

Posted: Thu Sep 03, 2009 1:13 am
by Guest
Hi,

On 9/2/09 9:28 PM, Thomas Guyot-Sionnest wrote:
>
> In the patch I'm talking about you would still need a host_name or
> hostgroup_name directive - usually the same one that is defined on any
> of your NRPE service definition. I don't see why you would want to take
> it out either...
>
> i.e.:
>
> define service {
> hostgroup_name linux-servers
> service_description NRPE
> blah blah blah...
> }
>
> define service {
> hostgroup_name linux-servers
> service_description Load
> servicegroups nrpe-services
> blah blah blah...
> }
>
> define servicedependency {
> hostgroup_name linux-servers
> service_description NRPE
> dependent_servicegroup_name nrpe-services
> execution_failure_criteria n
> notification_failure_criteria c,u
> }
>
> Then on each host, "Load" (and any other service in nrpe-services)
> becomes dependent of NRPE on the same host. Is that working?

I don't see any patch. I tried what you suggested with Nagios 3.0 and
all NRPE based services are now depending on all NRPE services on ALL
hosts. (ie. "Load" on host "hostA" would depends on "NRPE" on "hostA",
"hostB", "hostC", etc.)

You should try it and see the result on this page:
/nagios/cgi-bin/config.cgi?type=servicedependencies

I already tried all combination before asking the mailinglist and
writing the patch.

I also don't see the need to include a "host_name" or "hostgroup_name"
directive for this purpose. The host the service is running on is
already available in the service definition itself expanded from the
"dependent_servicegroup_name" directive.

--
Mathieu





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