[Nagios-devel] Adding support for nested hostgroups

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

[Nagios-devel] Adding support for nested hostgroups

Post by Guest »

AFAIK, it is currently not possible to declare one hostgroup to contain
all members of another group. Such a capability would be very useful to
us, so I've had a look at how it could be done in 2.0b3.

I would add a "member_hostgroups" attribute to the hostgroup config
object, and the content of this attribute would be passed to
xodtemplate_expand_hostgroups_and_hosts() (instead of NULL) from
xodtemplate_recombobulate_hostgroups().

Then we would have to make sure all hostgroups depended on were in fact
expanded first, so recombobulate_hostgroups() should do a topological sort
of hostgroups first.
This also implies the "process all hosts that have hostgroup directives"
loop should be moved first.

Would there be any annoying side-effects to sort
xodtemplate_hostgroup_list in-place, or any other thing I would have
missed at first look ?
If not, it looks like it would only be an half-an-hour coding session to
get this running :)






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