Re: [Nagios-devel] Nagios 2.x bug in pre-flight check with

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] Nagios 2.x bug in pre-flight check with

Post by Guest »

Thomas Guyot-Sionnest wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Tested against 2.7 and latest CVS: When I define a template like this:
>
> define servicedependency {
> dependent_hostgroup_name hsgrp_1,hsgrp_2,hsgrp_x
> name template_name
> register 0
> }
>
> Nagios bails out with the following error:
>
> Error: Could not expand master hostgroups and/or hosts specified in
> service dependency (config file '/path/to/config', starting on line 88)
>
> Looking quickly at the code it seems that it could affect many other
> objects... I didn't have time to pinpoint the problem though. I can
> possibly take a deeper look tonight if it's not obvious to anyone more
> used to play with the template code.
>
> As a workaround I can define a host_name and override it in the service
> definition.
>
> You may ask why I have a so simple template definition? The answer is
> that I keep all hostgroup lists at the same place and grouped together,
> so that when I add/remove hostgroups I don't need to grep around the
> config to make sure I didn't miss something. (While we're at it, I'm
> just thinking that the ability to get a hosts list out of a service
> templates would be nice if it can be done in a sane way...)

Thanks for the note. I'll get a patch into the 2.x branch in a moment.
The code in the 3.x/head branch appears to handle this properly.

Ethan Galstad
Nagios Developer
___
Email: [email protected]
Web: www.nagios.org





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