Page 1 of 1

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

Posted: Tue Nov 13, 2007 11:38 am
by Guest
-----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...)

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

iD8DBQFHOfzw6dZ+Kt5BchYRAt10AKC0AjImevWweeXAcVJxBGe3H51X7ACg3u8I
elzX6DmaT5Umyd9veWYWQOA=
=K7AC
-----END PGP SIGNATURE-----





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