Cool, will do. Thanks!
On Tue, Apr 8, 2014 at 9:08 AM, Michael Friedrich < [email protected]> wrote: > On 07.04.2014 21:08, Jason Erdmann wrote: > >> So in the icinga-core source, I noticed that the handling of populating >> hostgroups is a bit different from 1.8.4 to 1.11, eg. the 'result != ok' >> that short-circuits the allow_empty_hostgroup_assignment option? I'm >> sure there's a good reason for this, but any insight as to why? >> Anything we can do on our side? >> >> In xodtemplate.c in 1.8.4: >> /* add all members to the host group */ >> if (temp_memberlist == NULL && allow_empty_hostgroup_assignment >> == 0) { >> logit(NSLOG_CONFIG_ERROR, TRUE, "Error: Could not expand >> members specified in hostgroup (config file '%s', starting on line >> %d)\n", xodtemplate_config_file_name(temp_hostgroup->_config_file), >> temp_hostgroup->_start_line); >> return ERROR; >> } >> >> In 1.11: >> /* add all members to the host group */ >> if (result != OK || (temp_memberlist == NULL && >> allow_empty_hostgroup_assignment == 0)) { >> logit(NSLOG_CONFIG_ERROR, TRUE, "Error: Could not expand >> members specified in hostgroup (config file '%s', starting on line >> %d)\n", xodtemplate_config_file_name(temp_hostgroup->_config_file), >> temp_hostgroup->_start_line); >> return ERROR; >> } >> > > Looks like a bug to me. Try the diff and if it works out, please create a > new issue at dev.icinga.org > > diff --git a/xdata/xodtemplate.c b/xdata/xodtemplate.c > index 5ab2201..c6e8710 100644 > --- a/xdata/xodtemplate.c > +++ b/xdata/xodtemplate.c > @@ -8089,7 +8089,7 @@ int xodtemplate_recombobulate_hostgroups(void) { > result = > xodtemplate_expand_hostgroups_and_hosts(&temp_memberlist, > NULL, temp_hostgroup->members, temp_hostgroup->_config_file, temp_hostgrou > > > /* add all members to the host group */ > - if (result != OK || (temp_memberlist == NULL && > allow_empty_hostgroup_assignment == 0)) { > + if ((result != OK || temp_memberlist == NULL) && > allow_empty_hostgroup_assignment == 0) { > > logit(NSLOG_CONFIG_ERROR, TRUE, "Error: Could not > expand members specified in hostgroup (config file '%s', starting on line > %d)\n", x > return ERROR; > } > > > > >> >> >> On Fri, Apr 4, 2014 at 8:42 PM, Jason Erdmann >> <[email protected] >> <mailto:[email protected]>> wrote: >> >> Hi there, we just upgraded a few of our Icinga boxes from 1.8.4 to >> 1.11 and noticed that Icinga fails the config check on startup due >> to a couple of empty hostgroups. We have a handful of hostgroups >> that look like the one below: >> >> define hostgroup{ >> hostgroup_name some-group >> alias Some Group >> members some-.* >> } >> >> We push all groups to all nodes using rsync to simplify our config >> management, even though a given node may not have any hosts that >> match some groups. Icinga 1.8.4 let us do this but apparently 1.11 >> doesn't? >> >> We already have allow_empty_hostgroup_assignment=1 set as we did >> pre-upgrade. Any input? Thanks for the help! >> >> -- >> Jason Erdmann | TTNET Monitoring Systems Engineer | (312)268-1623 >> <tel:%28312%29268-1623> >> >> >> >> >> >> -- >> Jason Erdmann | TTNET Monitoring Systems Engineer | (312)268-1623 >> >> >> >> _______________________________________________ >> icinga-users mailing list >> [email protected] >> https://lists.icinga.org/mailman/listinfo/icinga-users >> >> > > -- > DI (FH) Michael Friedrich > > [email protected] || icinga open source monitoring > https://twitter.com/dnsmichi || lead core developer > [email protected] || https://www.icinga.org/team > irc.freenode.net/icinga || dnsmichi > _______________________________________________ > icinga-users mailing list > [email protected] > https://lists.icinga.org/mailman/listinfo/icinga-users > -- Jason Erdmann | TTNET Monitoring Systems Engineer | (312)268-1623
_______________________________________________ icinga-users mailing list [email protected] https://lists.icinga.org/mailman/listinfo/icinga-users
