[icinga-checkins] icinga.org: icinga2/feature/child-process-fd-leak-8900: Docs: Add an example of multi-parents configuration for the Migration chapter

git at icinga.org git at icinga.org
Tue Oct 4 08:27:58 CEST 2016


Module: icinga2
Branch: feature/child-process-fd-leak-8900
Commit: 8e63643d8bea7ffa25fca8fe4f6a07453f16861f
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=8e63643d8bea7ffa25fca8fe4f6a07453f16861f

Author: Mathieu Arnold <mat at mat.cc>
Date:   Tue Sep 27 17:53:38 2016 +0200

Docs: Add an example of multi-parents configuration for the Migration chapter

fixes #12832

Signed-off-by: Michael Friedrich <michael.friedrich at netways.de>

---

 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 ab352e8..f3c1ebb 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.
+
 #### <a id="manual-config-migration-hints-distributed-setup"></a> Manual Config Migration Hints for Distributed Setups
 
 * Icinga 2 does not use active/passive instances calling OSCP commands and requiring the NSCA



More information about the icinga-checkins mailing list