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

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

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

Post by Guest »

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 02/09/09 05:40 PM, Mathieu Gagné wrote:
> On 9/2/09 8:57 AM, Thomas Guyot-Sionnest wrote:
>>
>> Mathieu Gagné wrote:
>>> Hi,
>>>
>>> Thomas Guyot-Sionnest wrote:
>>>> Just add the host_name or hostgroup_name directive (you can put all
>>>> hostgroups for instance, or enable wildcards and use *) and you're set.
>>>
>>> Unfortunately, it doesn't work. This explains why I asked the
>>> mailinglist. If I do as you suggested, all NRPE based services will be
>>> depending on the NRPE service on ALL hosts. (not only their
>>> respective host)
>>>
>>> Here is my servicedependency definition:
>>>
>>> define servicedependency {
>>> hostgroup_name hosts-with-nrpe
>>> service_description NRPE
>>> dependent_servicegroup_name nrpe-services
>>> execution_failure_criteria n
>>> notification_failure_criteria c,u
>>> }
>>
>> And what result you get with that? I have pretty much the same, but with
>> a "dependent_service_name" directive, and it should do the same. If it
>> don't, it's a bug.
>
> So I guess it's a bug or it wasn't initially planned to work that way.
> You will find attached to this message a patch against Nagios 3.0.6 that
> should fix this bug.
>
> This servicedependency definition should now work:
>
> define servicedependency {
> service_description NRPE
> dependent_servicegroup_name nrpe-services
> execution_failure_criteria n
> notification_failure_criteria c,u
> }


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?


- --
Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFKnxu86dZ+Kt5BchYRAmyPAKCN8oyJBvenBVI5Zo6opVPiutYSPACgtDOh
wP6tmJTv6GfZHyFQIddQhzc=
=wyfM
-----END PGP SIGNATURE-----





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