From 1be590c06cdd75183bf9921d98448d00ef0e8239 Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Mon, 14 Aug 2023 18:52:16 +0200 Subject: [PATCH] parent_affecting_logging: a config object affects everything applied to it See the currently supported apply rules. --- lib/icinga/dependency.ti | 4 ++-- lib/icinga/notification.ti | 4 ++-- lib/icinga/scheduleddowntime.ti | 4 ++-- lib/icinga/service.ti | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/icinga/dependency.ti b/lib/icinga/dependency.ti index 41de7ba23cf..08d97fa7d90 100644 --- a/lib/icinga/dependency.ti +++ b/lib/icinga/dependency.ti @@ -23,13 +23,13 @@ class Dependency : CustomVarObject < DependencyNameComposer load_after Host; load_after Service; - [config, no_user_modify, required, navigation(child_host)] name(Host) child_host_name { + [config, no_user_modify, required, navigation(child_host), parent_affecting_logging] name(Host) child_host_name { navigate {{{ return Host::GetByName(GetChildHostName()); }}} }; - [config, no_user_modify, navigation(child_service)] String child_service_name { + [config, no_user_modify, navigation(child_service), parent_affecting_logging] String child_service_name { track {{{ if (!oldValue.IsEmpty()) { Service::Ptr service = Service::GetByNamePair(GetChildHostName(), oldValue); diff --git a/lib/icinga/notification.ti b/lib/icinga/notification.ti index 48536075748..40bafd34f4f 100644 --- a/lib/icinga/notification.ti +++ b/lib/icinga/notification.ti @@ -43,12 +43,12 @@ class Notification : CustomVarObject < NotificationNameComposer [no_user_view, no_user_modify] int type_filter_real (TypeFilter); [config] array(Value) states; [no_user_view, no_user_modify] int state_filter_real (StateFilter); - [config, no_user_modify, protected, required, navigation(host)] name(Host) host_name { + [config, no_user_modify, protected, required, navigation(host), parent_affecting_logging] name(Host) host_name { navigate {{{ return Host::GetByName(GetHostName()); }}} }; - [config, protected, no_user_modify, navigation(service)] String service_name { + [config, protected, no_user_modify, navigation(service), parent_affecting_logging] String service_name { track {{{ if (!oldValue.IsEmpty()) { Service::Ptr service = Service::GetByNamePair(GetHostName(), oldValue); diff --git a/lib/icinga/scheduleddowntime.ti b/lib/icinga/scheduleddowntime.ti index 1653f27e74d..e70992d2d03 100644 --- a/lib/icinga/scheduleddowntime.ti +++ b/lib/icinga/scheduleddowntime.ti @@ -26,12 +26,12 @@ class ScheduledDowntime : CustomVarObject < ScheduledDowntimeNameComposer load_after Host; load_after Service; - [config, protected, no_user_modify, required, navigation(host)] name(Host) host_name { + [config, protected, no_user_modify, required, navigation(host), parent_affecting_logging] name(Host) host_name { navigate {{{ return Host::GetByName(GetHostName()); }}} }; - [config, protected, no_user_modify, navigation(service)] String service_name { + [config, protected, no_user_modify, navigation(service), parent_affecting_logging] String service_name { track {{{ if (!oldValue.IsEmpty()) { Service::Ptr service = Service::GetByNamePair(GetHostName(), oldValue); diff --git a/lib/icinga/service.ti b/lib/icinga/service.ti index 4be5b4c70a3..ea9989e0cde 100644 --- a/lib/icinga/service.ti +++ b/lib/icinga/service.ti @@ -40,7 +40,7 @@ class Service : Checkable < ServiceNameComposer return displayName; }}} }; - [config, no_user_modify, required] name(Host) host_name; + [config, no_user_modify, required, parent_affecting_logging] name(Host) host_name; [no_storage, navigation] Host::Ptr host { get; navigate {{{