From d5579d9e2fe9b38fb657be06428b71a76a772035 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Tue, 16 Jul 2013 14:53:21 +0200 Subject: [PATCH] Config: add macros/custom dictionaries to Host Service definition additive inheritance (+=) works with templates too. --- lib/icinga/host.cpp | 2 ++ lib/icinga/icinga-type.conf | 12 ++++++++++++ 2 files changed, 14 insertions(+) diff --git a/lib/icinga/host.cpp b/lib/icinga/host.cpp index d41de5553..e052962bf 100644 --- a/lib/icinga/host.cpp +++ b/lib/icinga/host.cpp @@ -231,6 +231,8 @@ void Host::UpdateSlaveServices(void) keys.insert("servicedependencies"); keys.insert("hostdependencies"); keys.insert("export_macros"); + keys.insert("macros"); + keys.insert("custom"); ExpressionList::Ptr host_exprl = boost::make_shared(); item->GetLinkedExpressionList()->ExtractFiltered(keys, host_exprl); diff --git a/lib/icinga/icinga-type.conf b/lib/icinga/icinga-type.conf index e6ffb89ff..191981032 100644 --- a/lib/icinga/icinga-type.conf +++ b/lib/icinga/icinga-type.conf @@ -50,6 +50,10 @@ type Host { %attribute string "*" }, + %attribute dictionary "custom" { + %attribute string "*" + }, + %attribute name(CheckCommand) "check_command", %attribute name(TimePeriod) "check_period", @@ -156,6 +160,10 @@ type Host { %attribute string "*" }, + %attribute dictionary "custom" { + %attribute string "*" + }, + %attribute array "servicegroups" { %attribute name(ServiceGroup) "*" }, @@ -193,6 +201,10 @@ type Service { %attribute string "*" }, + %attribute dictionary "custom" { + %attribute string "*" + }, + %require "check_command", %attribute name(CheckCommand) "check_command", %attribute number "max_check_attempts", -- 2.40.0