shinken icon indicating copy to clipboard operation
shinken copied to clipboard

service variables inherit from host by default

Open aalleexxaannddrree opened this issue 9 years ago • 4 comments

After this forum thread, and as suggested, I open a ticket to enable a new behavior: service variables inherit from host by default

Only few variables are implicitly loaded from host when not defined in services (see this line of code) but it could be all/most of the variables in fact => This way, variables in host_1.cfg definition will overide the ones in templates/generic-service.cfg if set.

This helps a lot to avoid duplicating the packs to set 1 particular value for a host (or a hostgroup)

aalleexxaannddrree avatar Oct 14 '16 14:10 aalleexxaannddrree

This is quite tricky to implement, as there may be corner case not easy to track down.

Could you expose your problematic with a concrete case, perhaps it already exists a solution for it ?

geektophe avatar Oct 14 '16 15:10 geektophe

The sample case is with retry_interval and such things.

The main idea is: if you put a parameter/specific behavior on an host, why not have also this behavior on its service?

We should list all parameters, and look for which one is ok for such inheritance, and which ones are dangerous/impossible. Then we will know if we can just add new parameters to the implicit inheritance list, or if we should switch to a black list of parameters to not inherit instead ^^

naparuba avatar Oct 17 '16 08:10 naparuba

Let's analyze this, then :)

geektophe avatar Oct 17 '16 13:10 geektophe

I have a smiliar problem I think, however mine is that a service doesn't inherit everything I put in a template, resulting in a fail to start shinken. Should I create another ticket about that or here is fine ? F.

furiml avatar Nov 18 '16 11:11 furiml