From 8e63643d8bea7ffa25fca8fe4f6a07453f16861f Mon Sep 17 00:00:00 2001 From: Mathieu Arnold Date: Tue, 27 Sep 2016 17:53:38 +0200 Subject: [PATCH] Docs: Add an example of multi-parents configuration for the Migration chapter fixes #12832 Signed-off-by: Michael Friedrich --- doc/22-migrating-from-icinga-1x.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/doc/22-migrating-from-icinga-1x.md b/doc/22-migrating-from-icinga-1x.md index ab352e855..f3c1ebbb6 100644 --- a/doc/22-migrating-from-icinga-1x.md +++ b/doc/22-migrating-from-icinga-1x.md @@ -653,6 +653,34 @@ host and let the dependency ignore that instead of the hardcoded host name. That to the Icinga 1.x example and a best practice hint only. +Another way to express the same configuration would be something like: + + object Host "vmware-master" { + import "linux-server-template" + groups += [ "vmware" ] + address = "192.168.1.10" + } + + object Host "vmware-vm1" { + import "linux-server-template" + groups += [ "vmware" ] + address = "192.168.27.1" + vars.parents = [ "vmware-master" ] + } + + object Host "vmware-vm2" { + import "linux-server-template" + groups += [ "vmware" ] + address = "192.168.28.1" + vars.parents = [ "vmware-master" ] + } + + apply Dependency "host-to-parent-" for (parent in host.vars.parents) to Host { + parent_host_name = parent + } + +This example allows finer grained host-to-host dependency, as well as multiple dependency support. + #### Manual Config Migration Hints for Distributed Setups * Icinga 2 does not use active/passive instances calling OSCP commands and requiring the NSCA -- 2.40.0