<div>Hi,<br><br>I'm currently experementing with inheritance from multiple templates (as it is recommened at <a href="http://docs.icinga.org/latest/en/objectinheritance.html#multipleinheritancesources" target="_blank">http://nagios.sourceforge.net/docs/3_0/objectinheritance.html</a>) and I stumbled across a rather unexpected behavior.<br>
<br></div><div>My example configuration looks like this:<br><br>-----------<br><span style="font-family:courier new,monospace">define host {<br>use generic-host<br>name tempTwo<br>hostgroups +hg_two<br>
contact_groups +cg_two<br>register 0<br>}<br><br>define host {<br>use generic-host<br>name tempOne<br>hostgroups +hg_one<br>contact_groups +cg_one<br>register 0<br>}<br><br>define host {<br>
use tempOne,tempTwo<br>
host_name example<br>address 127.0.0.1<br>}</span><br>-------------------<br></div><div>I'm not getting any erros when parsing the config. However, the results are odd:<br>1.
My host "example" is now a member of two hostgroups: hg_one and hg_two.
That seemed logical to me as both templates only append another member
to the hostgroups list. <br>
</div><div>2. Yet, the host has only one contactgroup: cg_one.<br></div><div>3. If I change the use line in the example host to "use tempTwo, tempOne", the only notification group will be cg_two.<br>4.
If I add yet another template (tempThree with analog hg_three and
cg_three) the result is as expected: all three hostgroups are applied
but only the first contactgroup.<br>
</div><div><br></div>
<div>Can someone explain to me why these two behaviors differ? I would
think that the behavior shown by the hostgroup is correct (and <a href="http://www.mentby.com/Group/nagios-users/object-definitions-with-multiple-templates.html" target="_blank">http://www.mentby.com/Group/nagios-users/object-definitions-with-multiple-templates.html</a> would support that). So is the behavior of the contact_group inheritance a bug or did I miss something in the documentation?<br>
<br></div><div>Cheers,<br></div>Gerd Radecke