On 27.10.2012 23:29, Daniel Parthey wrote: > Michael Friedrich wrote: >> On 25.10.2012 16:51, Chris Wood wrote: >>> 2) If I include those same hostgroups in another hostgroup via >>> hostgroup_members, and then use that new hostgroup in my host, my >>> services vanish, but icinga sees the config as valid (note I have >>> allow_empty_hostgroup_assignment=1, and without this enabled, the >>> parser decides the config has errors, due to hostgroups with no members) >>> >>> From my reading of the documentation, it seems to me like what I'm >>> trying should work. >>> Am I wrong? >>> Is the Icinga config parser wrong? >> Basically you are trying to use one of the object tricks, adding >> services to your hostgroups, then adding hosts to those groups, letting >> them inherit all the services attached to that hostgroup. that actually >> works, and is documented. >> >> In the last call, you are trying to chain/nest hostgroups into a "super" >> hostgroup, hoping that hostgroups inherit their attributes from each >> other (namely all your services attached to g:host:passive:core:disk:1 >> and so on, which should then be inherited via hostgroup_members to the >> super hostgroup g:host:passive:core:1 where you put host_z into). >> >> That does not work, as hostgroups do not exchange/inherit attributes >> from each other. So you are missing the bit in that one. >> Can you point to the exact location in the documentation which did bring >> you to that believe? > In fact we're doing a similar object trick with our config, but currently > we have still different hostgroups for alert levels like hostgroup > "Linux Server with Email Alerting" and "Linux Server with SMS Alerting". > This is kind of annoying with a hand-written config, since the services > associated to these similar hostgroups need to be kept in sync. > > Could additive inheritance help here?
I guess you should probably rewrite the config parser, and let it handle special cases like yours. I've never seen such an example in the wild before, and there is likely none of those as noone kept replying on this list either. I for myself try to avoid the hostgroup tricks, as they generate a lot of confusion, when something like yours just does not work with object inheritance. As usual, patches for review welcome. kind regards, Michael PS: Re: "Want a Challenge?" - Try to find a way to achieve that with the Icinga 2 Tech Preview config examples, and report back, even if this is not yet finished. Might be a bit easier over there with heavy templating. Would be interesting you can achieve that one over there. https://git.icinga.org/?p=icinga2.git;a=blob_plain;f=docs/icinga2-config.txt;hb=HEAD (if you cannot read that, run it with asciidoc to generate a nice html) -- DI (FH) Michael Friedrich mail: michael.friedr...@gmail.com twitter: https://twitter.com/dnsmichi jabber: dnsmi...@jabber.ccc.de irc: irc.freenode.net/icinga dnsmichi icinga open source monitoring position: lead core developer url: https://www.icinga.org ------------------------------------------------------------------------------ WINDOWS 8 is here. Millions of people. Your app in 30 days. Visit The Windows 8 Center at Sourceforge for all your go to resources. http://windows8center.sourceforge.net/ join-generation-app-and-make-money-coding-fast/ _______________________________________________ icinga-users mailing list icinga-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/icinga-users