[icinga-users] Parent hosts

Michael Friedrich michael.friedrich at gmail.com
Sat Aug 30 12:49:44 CEST 2014

Am 23.08.2014 23:32, schrieb Daniel Bareiro:
> Hi all,
> Searching in Icinga 2.x the equivalent to the "parent" attribute in the
> host definition of Nagios/Icinga 1.x, I found this reference [1].
> If I understood correctly, every relationship (even the parents who have
> only one child) is achieved by creating a group which contains the
> parent and the children, and then creating a Dependency object.
> Is this the only way to achieve this? Since, for example, having to
> create a single group for the purposes of the relationship may make the
> configurations become more voluminous.

Parents are used for two things in Icinga 1.x:

1) Network reachability
2) External interface visualization for network maps

In terms of 1) parent relations are just a plain duplicate of a host 
dependency. 2) should be achieved by a certain custom attribute and an 
interface capable of doing so. Addons like NagVis use their own layer 
for defining such objects and their relationships on a statusmap, and do 
not rely on the parents attribute at all.

So the latter shows that only 1) is really important, when it comes to 
determine the reachability state (of hosts in that special case).

Even if "parents foobar" is just a one-liner in Icinga 1.x, you're 
missing any conditions and filters a real host dependecy would allow you 
to define. And if you argue that you don't need them, you could still 
stash them into a template and use simple dependency rules.

template Dependency "global-router-dep" {
   parent_host_name = "global.router"
   states = [ Up ]
   disable_checks = true
   disable_notifications = true

apply Dependency "router-web-srv" to Host {
   import "global-router-dep"

   assign where match("*web*", host.name)
   ignore where match("*internal*", host.vars.description)

More details on how you determine network reachability with Icinga 2 can 
be found on the docs.


kind regards,

> Thanks in advance.
> Best regards,
> Daniel
> [1]
> http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/migration#manual-config-migration-hints-host-parents
> _______________________________________________
> icinga-users mailing list
> icinga-users at lists.icinga.org
> https://lists.icinga.org/mailman/listinfo/icinga-users

DI (FH) Michael Friedrich

michael.friedrich at gmail.com  || icinga open source monitoring
https://twitter.com/dnsmichi || lead core developer
dnsmichi at jabber.ccc.de       || https://www.icinga.org/team
irc.freenode.net/icinga      || dnsmichi

More information about the icinga-users mailing list