From cffe3cf57cd5e16cb77d459642e943363548db0c Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Sun, 18 May 2014 08:59:13 +0200 Subject: [PATCH] Simplify "ignore where" condition in the example config. Refs #5795 --- doc/3-monitoring-basics.md | 2 +- etc/icinga2/conf.d/generic-host.conf | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/3-monitoring-basics.md b/doc/3-monitoring-basics.md index d949bcbe4..78ca76891 100644 --- a/doc/3-monitoring-basics.md +++ b/doc/3-monitoring-basics.md @@ -123,7 +123,7 @@ based on attribute identifiers for example `host_name` objects can be [applied]( check_command = "ping4" assign where "generic-host" in host.templates - ignore where !host.address + ignore where host.address == "" } In this example the `ping4` service will be created as object for all hosts importing diff --git a/etc/icinga2/conf.d/generic-host.conf b/etc/icinga2/conf.d/generic-host.conf index 7d5a317fc..34b948c0b 100644 --- a/etc/icinga2/conf.d/generic-host.conf +++ b/etc/icinga2/conf.d/generic-host.conf @@ -16,7 +16,7 @@ apply Service "ping4" { check_command = "ping4" assign where "generic-host" in host.templates - ignore where !host.address + ignore where host.address == "" } apply Service "ping6" { @@ -25,7 +25,7 @@ apply Service "ping6" { check_command = "ping6" assign where "generic-host" in host.templates - ignore where !host.address6 + ignore where host.address6 == "" } apply Notification "mail-icingaadmin" to Host {