]> granicus.if.org Git - icinga2/commitdiff
Documentation: Add disable/override objects/attribute section.
authorMichael Friedrich <michael.friedrich@netways.de>
Fri, 24 Jan 2014 15:28:21 +0000 (16:28 +0100)
committerMichael Friedrich <michael.friedrich@netways.de>
Fri, 24 Jan 2014 15:28:21 +0000 (16:28 +0100)
Fixes #5442

doc/4.1-configuration-syntax.md

index cd96ee8b299e5df34700dafad2486788981e7b17..4550f49a40ff892233a632cfec0bcdb5895d9e04 100644 (file)
@@ -271,6 +271,31 @@ templates though in general they are.
 Parent objects are resolved in the order they're specified using the
 `inherits` keyword.
 
+### Disable/Override Objects and Attributes
+
+Object attributes can be overridden by defining the additional changed attribute
+directly on the object. Use the `+=` operator for the inline services dictionary.
+
+    services["overridden-custom-attr"] += {
+      custom = {
+        notes = "disabled all custom attr"
+      }
+    }
+
+If you don't require an attribute inherited from templates, you can simply
+override its value by setting it explicitely to `null`.
+
+    services["no-custom-attr"] += {
+      custom = null
+    }
+
+
+The same method applies for disabling services defined in the inline `services`
+dictionary by exiplicitely overriding their value with `null`.
+
+    services["ping6"] = null
+
+
 ### Variables
 
 Global variables can be set using the `var` and `const` keywords: