The low-level discovery rule object has the following properties.
The LLD rule filter object defines a set of conditions that can be used to filter discovered objects. It has the following properties:
Property | Description | |
---|---|---|
conditions (required) | array | Set of filter conditions to use for filtering results. |
evaltype (required) | integer | Filter condition evaluation method. Possible values: 0 - and/or; 1 - and; 2 - or; 3 - custom expression. |
eval_formula | string | (readonly) Generated expression that will be used for evaluating filter conditions. The expression contains IDs that reference specific filter conditions by its formulaid . The value of eval_formula is equal to the value of formula for filters with a custom expression. |
formula | string | User-defined expression to be used for evaluating conditions of filters with a custom expression. The expression must contain IDs that reference specific filter conditions by its . The IDs used in the expression must exactly match the ones defined in the filter conditions: no condition can remain unused or omitted. Required for custom expression filters. |
LLD rule filter condition
The LLD rule filter condition object defines a separate check to perform on the value of an LLD macro. It has the following properties:
Property | Description | |
---|---|---|
macro (required) | string | LLD macro to perform the check on. |
value (required) | string | Value to compare with. |
formulaid | string | Arbitrary unique ID that is used to reference the condition from a custom expression. Can only contain capital-case letters. The ID must be defined by the user when modifying filter conditions, but will be generated anew when requesting them afterward. |
operator | integer | Condition operator. Possible values: 8 - (default) matches regular expression; 9 - does not match regular expression. |
To better understand how to use filters with various types of expressions, see examples on the discoveryrule.get and method pages.
The LLD macro path has the following properties:
Property | Type | Description |
---|---|---|
lld_macro (required) | string | LLD macro. |
path (required) | string | Selector for value which will be assigned to corresponding macro. |
The LLD rule preprocessing object has the following properties.
Property | Description | |
---|---|---|
type (required) | integer | The preprocessing option type. Possible values: 5 - Regular expression matching; 11 - XML XPath; 12 - JSONPath; 15 - Does not match regular expression; 16 - Check for error in JSON; 17 - Check for error in XML; 20 - Discard unchanged with heartbeat; 23 - Prometheus to JSON; 24 - CSV to JSON; 25 - Replace. |
params (required) | string | Additional parameters used by preprocessing option. Multiple parameters are separated by LF (\n) character. |
error_handler (required) | integer | Action type used in case of preprocessing step failure. Possible values: 0 - Error message is set by Zabbix server; 1 - Discard value; 2 - Set custom value; 3 - Set custom error message. |
error_handler_params (required) | string | Error handler parameters. Used with error_handler .Must be empty, if error_handler is 0 or 1.Can be empty if, error_handler is 2.Cannot be empty, if error_handler is 3. |
Preprocessing type | Name | Parameter 1 | Parameter 2 | Parameter 3 | Supported error handlers |
---|---|---|---|---|---|
5 | Regular expression | pattern1 | output2 | 0, 1, 2, 3 | |
11 | XML XPath | path3 | 0, 1, 2, 3 | ||
12 | JSONPath | path3 | 0, 1, 2, 3 | ||
15 | Does not match regular expression | pattern1 | 0, 1, 2, 3 | ||
16 | Check for error in JSON | path3 | 0, 1, 2, 3 | ||
17 | Check for error in XML | path3 | 0, 1, 2, 3 | ||
20 | Discard unchanged with heartbeat | seconds4, 5, 6 | |||
23 | Prometheus to JSON | pattern5, 7 | 0, 1, 2, 3 | ||
24 | CSV to JSON | character2 | character2 | 0,1 | 0, 1, 2, 3 |
25 | Replace | search string2 | replacement2 |
1 regular expression
2 string
3 JSONPath or XML XPath
4 positive integer (with support of time suffixes, e.g. 30s, 1m, 2h, 1d)
5 user macro
6 LLD macro
7 Prometheus pattern following the syntax: . Each Prometheus pattern component (metric, label name, label value and metric value) can be user macro.
8 Prometheus output following the syntax: <label name>
.
The LLD rule overrides object defines a set of rules (filters, conditions and operations) that are used to override properties of different prototype objects. It has the following properties:
LLD rule override filter
The LLD rule override filter object defines a set of conditions that if they match the discovered object the override is applied. It has the following properties:
Property | Description | |
---|---|---|
evaltype (required) | integer | Override filter condition evaluation method. Possible values: 0 - and/or; 1 - and; 2 - or; 3 - custom expression. |
conditions (required) | array | Set of override filter conditions to use for matching the discovered objects. |
eval_formula | string | (readonly) Generated expression that will be used for evaluating override filter conditions. The expression contains IDs that reference specific override filter conditions by its formulaid . The value of eval_formula is equal to the value of formula for filters with a custom expression. |
formula | string | User-defined expression to be used for evaluating conditions of override filters with a custom expression. The expression must contain IDs that reference specific override filter conditions by its . The IDs used in the expression must exactly match the ones defined in the override filter conditions: no condition can remain unused or omitted. Required for custom expression override filters. |
LLD rule override filter condition
The LLD rule override filter condition object defines a separate check to perform on the value of an LLD macro. It has the following properties:
Property | Description | |
---|---|---|
macro (required) | string | LLD macro to perform the check on. |
value (required) | string | Value to compare with. |
formulaid | string | Arbitrary unique ID that is used to reference the condition from a custom expression. Can only contain capital-case letters. The ID must be defined by the user when modifying filter conditions, but will be generated anew when requesting them afterward. |
operator | integer | Condition operator. Possible values: 8 - (default) matches regular expression; 9 - does not match regular expression. |
LLD rule override operation
The LLD rule override operation is combination of conditions and actions to perform on the prototype object. It has the following properties:
Property | Description | |
---|---|---|
operationobject (required) | integer | Type of discovered object to perform the action. Possible values: 0 - Item prototype; 1 - Trigger prototype; 2 - Graph prototype; 3 - Host prototype. |
operator | integer | Override condition operator. Possible values: 0 - (default) equals; 1 - does not equal; 2 - contains; 3 - does not contain; 8 - matches; 9 - does not match. |
value | string | Pattern to match item, trigger, graph or host prototype name depending on selected object. |
opstatus | object | Override operation status object for item, trigger and host prototype objects. |
opdiscover | object | Override operation discover status object (all object types). |
opperiod | object | Override operation period (update interval) object for item prototype object. |
ophistory | object | Override operation history object for item prototype object. |
optrends | object | Override operation trends object for item prototype object. |
opseverity | object | Override operation severity object for trigger prototype object. |
optag | array | Override operation tag object for trigger prototype object. |
optemplate | array | Override operation template object for host prototype object. |
opinventory | object | Override operation inventory object for host prototype object. |
LLD rule override operation status
LLD rule override operation status that is set to discovered object. It has the following properties:
Property | Description | |
---|---|---|
status (required) | integer | Override the status for selected object. Possible values: 0 - Create enabled; 1 - Create disabled. |
LLD rule override operation discover
Property | Description | |
---|---|---|
discover (required) | integer | Override the discover status for selected object. Possible values: 0 - Yes, continue discovering the objects; 1 - No, new objects will not be discovered and existing ones will me marked as lost. |
LLD rule override operation period
LLD rule override operation period is an update interval value (supports custom intervals) that is set to discovered item. It has the following properties:
LLD rule override operation history
LLD rule override operation history value that is set to discovered item. It has the following properties:
Property | Type | Description |
---|---|---|
history (required) | string | Override the history of item prototype which is a time unit of how long the history data should be stored. Also accepts user macro and LLD macro. |
LLD rule override operation trends
LLD rule override operation trends value that is set to discovered item. It has the following properties:
Property | Type | Description |
---|---|---|
trends (required) | string | Override the trends of item prototype which is a time unit of how long the trends data should be stored. Also accepts user macro and LLD macro. |
LLD rule override operation severity
LLD rule override operation severity value that is set to discovered trigger. It has the following properties:
Property | Type | Description |
---|---|---|
severity (required) | integer | Override the severity of trigger prototype. Possible values are: 0 - (default) not classified; 1 - information; 2 - warning; 3 - average; 4 - high; 5 - disaster. |
LLD rule override operation tag
LLD rule override operation tag object contains tag name and values that are set to discovered trigger. It has the following properties:
Property | Type | Description |
---|---|---|
tag (required) | string | Override the tag name of trigger prototype tags. |
value | string | Override the tag value of trigger prototype tags. |
LLD rule override operation template
LLD rule override operation template object that is linked to discovered host. It has the following properties:
Property | Type | Description |
---|---|---|
templateid (required) | string | Override the template of host prototype linked templates. |