Nagios implied and additive inheritance; possible bug?
Jochen Bern
Jochen.Bern at LINworks.de
Thu Mar 29 10:49:35 CEST 2012
On 03/29/2012 07:48 AM, Thomas Guyot-Sionnest wrote:
> On 12-03-28 01:46 PM, Jochen Bern wrote:
>> The fact of the matter is that in
>> xdata/xodtemplate.c:xodtemplate_read_config_data(), you have calls - in
>> this order - to
>
>> 1. xodtemplate_resolve_objects(), which [...] applies
>> all templates [and] does the additive inheritance,
>> 2. xodtemplate_clean_additive_strings(), which silently removes any
>> surviving "+" from contacts and contact groups settings of all
>> objects except host and service escalations, and
>> 3. xodtemplate_inherit_object_properties(), which does the host-to-
>> service inheritance.
>
> So indeed changing things around isn't going to work, however there
> might be another way to fix it. [...]
> In #2, remove the +'es *except the first one* for anything that will be
> processed by xodtemplate_inherit_object_properties()
Sorry, I misspoke. xodtemplate_clean_additive_string() (which is the
workhorse called from xodtemplate_clean_additive_strings()) removes only
*leading* '+'s in the first place.
You might also want to note that someone, on 03/05/08, moved the calls
to xodtemplate_clean_additive_string() affecting the contacts and
contact groups (=: CaCG) of host and service (=: HaS) *escalations* out
of xodtemplate_clean_additive_strings() and into
xodtemplate_inherit_object_properties() (*), so that additive
inheritance of CaCG *does* work from HaS to their escalations. I can
only assume that there was a tangible reason *not* to wholesale move the
cleaning to the end of xodtemplate_inherit_object_properties() and make
additive inheritance the norm for cross-object-type inheritance, like it
already is for template-to-object inheritance.
(*) and added explicit calls to actually *do* the additive inheritance
Regards,
J. Bern
--
Jochen Bern, Systemingenieur --- LINworks GmbH <http://www.LINworks.de/>
Postfach 100121, 64201 Darmstadt | Robert-Koch-Str. 9, 64331 Weiterstadt
PGP (1024D/4096g) FP = D18B 41B1 16C0 11BA 7F8C DCF7 E1D5 FAF4 444E 1C27
Tel. +49 6151 9067-231, Zentr. -0, Fax -299 - Amtsg. Darmstadt HRB 85202
Unternehmenssitz Weiterstadt, Geschäftsführer Metin Dogan, Oliver Michel
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
More information about the Developers
mailing list