From: Michael Friedrich Date: Tue, 16 Jul 2013 12:53:21 +0000 (+0200) Subject: Config: add macros/custom dictionaries to Host Service definition X-Git-Tag: v0.0.3~836 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d5579d9e2fe9b38fb657be06428b71a76a772035;p=icinga2 Config: add macros/custom dictionaries to Host Service definition additive inheritance (+=) works with templates too. --- 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",