[icinga-checkins] icinga.org: icinga2/master: Docs: Better explaination for zones.d and apply rule workaround

git at icinga.org git at icinga.org
Mon Jul 25 15:42:34 CEST 2016


Module: icinga2
Branch: master
Commit: 162931a1b4d767e39fec3d566a03cb4f72e0b4e6
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=162931a1b4d767e39fec3d566a03cb4f72e0b4e6

Author: Michael Friedrich <michael.friedrich at netways.de>
Date:   Mon Jul 25 15:38:50 2016 +0200

Docs: Better explaination for zones.d and apply rule workaround

refs #12217

---

 doc/13-distributed-monitoring-ha.md |   42 +++++------------------------------
 1 file changed, 5 insertions(+), 37 deletions(-)

diff --git a/doc/13-distributed-monitoring-ha.md b/doc/13-distributed-monitoring-ha.md
index 2b51b52..bf1ddb8 100644
--- a/doc/13-distributed-monitoring-ha.md
+++ b/doc/13-distributed-monitoring-ha.md
@@ -472,45 +472,13 @@ If you are planning to synchronize local service health checks inside a zone, lo
 [command endpoint](13-distributed-monitoring-ha.md#cluster-health-check-command-endpoint)
 explainations.
 
-[Apply rules](3-monitoring-basics.md#using-apply) put into zone directories underneath `zones.d`
-must specify the zone where they should be applied to e.g. `assign where host.zone == "dmz1-checker"`.
-
-    # tree /etc/icinga2/zones.d
-    /etc/icinga2/zones.d
-    ├── dmz1-checker
-    │   ├── hosts.conf
-    │   ├── apply_services.conf
-    ├── dmz2-checker
-    │   └── hosts.conf
-    ├── global-templates
-    │   ├── apply_services.conf
-    │   ├── commands.conf
-    ├── ha-master
-    │   └── health.conf
-    └── README
-
-Global apply rules:
-
-    # cat /etc/icinga2/zones.d/global-templates/apply_services.conf
-
-    apply Service "ping4" {
-      check_command = "ping4"
-
-      assign where host.address
-    }
-
-
-Zone-specific apply rules:
-
-    # cat /etc/icinga2/zones.d/dmz1-checker/apply_services.conf
-
-    apply Service "mysql" {
-      check_command = "mysql"
-
-      assign where host.zone == "dmz1-checker" && host.vars.db_type == "mysql"
-    }
+[Apply rules](3-monitoring-basics.md#using-apply) in zone directories underneath `zones.d`
+also match against objects defined outside of that particular zone directory.
 
+To work around this issue you can use an `assign where` rule to limit the apply rule to
+a specific zone:
 
+    assign where host.zone == "dmz1-checker"
 
 ## <a id="cluster-health-check"></a> Cluster Health Check
 



More information about the icinga-checkins mailing list