Additive inheritance and canceling inheritance issues

Shad L. Lords slords at lordsfam.net
Tue Oct 16 05:11:08 CEST 2007


>> Following up on my previous message about additive inhereritance it 
>> appears
>> that it only applies to the first used instance.  Here is an example 
>> config
>> that fails.  There also appears to be an issue with canceling 
>> inheritance.
>>
>
> [ somewhat bizarre configuration axed out ]
>
>>
>> Hope this helps track down some potential issues,
>>
>
> To be perfectly honest, I've always felt it overly complicates the nagios 
> config
> parsing code to even allow templates to have templates. For really large
> networks, where they'd obviously be of most use, it's no great chore to 
> copy
> and paste one and then modify the variable that you want to alter.

If you have parameters set in a template then if you want to update them you 
only have one place to do it.  If you have 3k config files (or a 100k file) 
then you have thousands of places you have to modify.

> That being said, it looks as if you've run into a bug that nobody has 
> noticed
> since february 5 of this year, when Ethan added 'Support for "additive" 
> string
> inheritance'.

Glad to be of help.  I just started trying to convert our existing config 
files over to the 3.x system.  I'm trying to take advantage of the way you 
can use new templates and noticed a few bugs or inconsistiencies.  Thought 
I'd pass them along to make the product the best it could be.

> I'm not sure how many people use this feature in an inheritance chain like 
> you
> do, and as I personally don't really see the use for it, I'd rather spend 
> my time
> on other things.

If they can be fixed our config would benefit from it quite a bit.  It would 
cut down the amount of manual tweaking necessary to get things to work 
right.  If something is advertised as working I think it should work or not 
be in there.

> I've got some config-parsing patches brewing in my head though,
> and it's possible one of them will fix this issue in passing. For now, I 
> think you should
> probably stick to using a single template, and add more templates as you 
> go along.

That is basically how we are doing things in 2.x and one of things we were 
really looking forward too was the multiple inheritance properties of 
templates.

> I'm not a great fan of testing every bizarre configuration users might 
> come up with,
> and I think Ethan feels the same, so when you're trying some really exotic 
> stuff and
> it happens to not work, you're kinda on your own.

I don't know how bizarre things are.  We are trying to template parts of the 
stuff and make them work.  We put all default parts into a default template. 
We put all parts dealing with hours of operation in another template.  Where 
we ran into problems was trying to get which groups get notified into a 
template.  It would be nice to be able to include the templates for each 
group and have the correct hostgroups and notification group set 
automatically with additive.

 -Shad 


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/




More information about the Developers mailing list