]> granicus.if.org Git - icinga2/commitdiff
Config: add macros/custom dictionaries to Host Service definition
authorMichael Friedrich <michael.friedrich@netways.de>
Tue, 16 Jul 2013 12:53:21 +0000 (14:53 +0200)
committerMichael Friedrich <michael.friedrich@netways.de>
Tue, 16 Jul 2013 12:53:21 +0000 (14:53 +0200)
additive inheritance (+=) works with templates too.

lib/icinga/host.cpp
lib/icinga/icinga-type.conf

index d41de5553a7c4e8245873b9a37a2f59f81fe0ee1..e052962bfad3885397b5a03a96fbea92380c36a3 100644 (file)
@@ -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<ExpressionList>();
                        item->GetLinkedExpressionList()->ExtractFiltered(keys, host_exprl);
index e6ffb89ffa2b2d2b8e86b96ba008ee67050ca726..191981032af9c03423171384e5e7b1a152a0bf66 100644 (file)
@@ -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",