Mass define servicedependency for NRPE services
Mathieu Gagné
mgagne at iweb.com
Wed Sep 2 05:07:18 CEST 2009
Hi,
Thomas Guyot-Sionnest wrote:
> This had been implemented in Nagios 3, all you have to do is taking out
> the dependent_host[group]_name directive and the dependency will only
> affect services within their respective host.
Yes. I know about it and I'm using it somewhere else but in a different
way. I'm not using a servicegroup but list all services instead. It
works great.
>> Basically, I don't want to have to define a servicedependency for each
>> host that has NRPE installed on it and even less for each NRPE based
>> service.
>>
>> I would like to be able to use this definition:
>>
>> define servicedependency {
>>
>> ; NRPE service for each hosts referred by services in nrpe-services
>> ; The NRPE service has previously been mass-defined on all hosts
>> ; with NRPE installed using a host template
>> service_description NRPE
>>
>> ; Every NRPE based services
>> ; Each NRPE based service is added to nrpe-services
>> ; using a service template
>> dependent_servicegroup_name nrpe-services
>>
>> execution_failure_criteria n
>> notification_failure_criteria c,u
>> }
>
> 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
}
>> How hard would it be to implement this feature? Is it even possible?
>> Would it be the right "way" to do it? Any idea? Thanks!
>
> If you need a patch for Nagos 2.x I have one lying around; just let me
> know and I'll send it.
I upgraded from Nagios2 to Nagios3 today. I'm therefore using Nagios3.
--
Mathieu
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
More information about the Developers
mailing list