mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-27 23:54:07 +02:00
parent
013690e486
commit
05d0d88317
@ -24,8 +24,8 @@ define objects the `object` keyword is used:
|
||||
|
||||
Each object is uniquely identified by its type (`Host`) and name
|
||||
(`host1.example.org`). Objects can contain a comma-separated list of
|
||||
property declarations. The following data types are available for
|
||||
property values:
|
||||
property declarations. Instead of commas semi-colons may also be used.
|
||||
The following data types are available for property values:
|
||||
|
||||
### Expressions
|
||||
|
||||
@ -52,6 +52,9 @@ Example:
|
||||
Supported suffixes include ms (milliseconds), s (seconds), m (minutes),
|
||||
h (hours) and d (days).
|
||||
|
||||
Duration literals are converted to seconds by the config parser and
|
||||
are treated like numeric literals.
|
||||
|
||||
#### <a id="string-literals"></a> String Literals
|
||||
|
||||
A string.
|
||||
@ -170,7 +173,7 @@ in | "foo" in [ "foo", "bar" ] (true) | Element contained in
|
||||
!in | "foo" !in [ "bar", "baz" ] (true) | Element not contained in array
|
||||
() | (3 + 3) * 5 | Groups sub-expressions
|
||||
|
||||
Constants may be used in constant expressions:
|
||||
Constants may be used in expressions:
|
||||
|
||||
const MyCheckInterval = 10m
|
||||
|
||||
@ -200,7 +203,7 @@ intersection(array, array, ...) | Returns an array containing all unique element
|
||||
string(value) | Converts the value to a string.
|
||||
number(value) | Converts the value to a number.
|
||||
bool(value) | Converts to value to a bool.
|
||||
log(string) | Writes a message to the log.
|
||||
log(value) | Writes a message to the log. Non-string values are converted to a JSON string.
|
||||
|
||||
### <a id="operators"></a> Dictionary Operators
|
||||
|
||||
@ -353,13 +356,11 @@ override its value by setting it explicitely to `null`.
|
||||
custom = null
|
||||
}
|
||||
|
||||
|
||||
The same method applies for disabling services defined in the inline `services`
|
||||
dictionary by explicitly overriding their value with `null`.
|
||||
|
||||
services["ping6"] = null
|
||||
|
||||
|
||||
### <a id="constants"></a> Constants
|
||||
|
||||
Global constants can be set using the `const` keyword:
|
||||
|
Loading…
x
Reference in New Issue
Block a user