Hi,
I'm currently experementing with inheritance from multiple templates (as it
is recommened at
http://docs.icinga.org/latest/en/objectinheritance.html#multipleinheritancesources)
and I stumbled across a rather unexpected behavior.
My example configuration looks like this:
-----------
define host {
use generic-host
name tempTwo
hostgroups +hg_two
contact_groups +cg_two
register 0
}
define host {
use generic-host
name tempOne
hostgroups +hg_one
contact_groups +cg_one
register 0
}
define host {
use tempOne,tempTwo
host_name example
address 127.0.0.1
}
-------------------
I'm not getting any erros when Icinga parses the config. However, the
results are odd:
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.
2. Yet, the host has only one contactgroup: cg_one.
3. If I change the use line in the example host to "use tempTwo,
tempOne", the only notification group will be cg_two.
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.
Can someone explain to me why these two behaviors differ? I would think
that the behavior shown by the hostgroup is correct (and
http://www.mentby.com/Group/nagios-users/object-definitions-with-multiple-templates.htmlwould
support that). So is the behavior of the contact_group inheritance a
bug or did I miss something in the documentation?
Cheers,
Gerd Radecke
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
icinga-users mailing list
icinga-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/icinga-users