Zabbix Documentation 5.2

3.04.05.0 (current)| In development:5.2 (devel)| Unsupported:1.82.02.22.43.23.44.24.4Guidelines

User Tools

Site Tools


manual:api:reference:discoveryrule:object

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
manual:api:reference:discoveryrule:object [2020/06/02 07:23]
iivs fixed typo (ZBXNEXT-3035)
manual:api:reference:discoveryrule:object [2020/08/05 08:53] (current)
martins-v internal link to data types (ZBX-17160)
Line 5: Line 5:
 ==== LLD rule ==== ==== LLD rule ====
 The low-level discovery rule object has the following properties. The low-level discovery rule object has the following properties.
-^  Property ​ ^  Type  ^  Description ​ ^+^  Property ​ ^  ​[[:​manual/​api/​reference_commentary#​data_types|Type]]  ​^ ​ Description ​ ^
 | itemid ​ | string ​ | //​(readonly)//​ ID of the LLD rule.  | | itemid ​ | string ​ | //​(readonly)//​ ID of the LLD rule.  |
 | **delay** \\ (required) | string | Update interval of the LLD rule. Accepts seconds or time unit with suffix and with or without one or more [[manual:​config:​items:​item:​custom_intervals|custom intervals]] that consist of either flexible intervals and scheduling intervals as serialized strings. Also accepts user macros. Flexible intervals could be written as two macros separated by a forward slash. Intervals are separated by a semicolon. | | **delay** \\ (required) | string | Update interval of the LLD rule. Accepts seconds or time unit with suffix and with or without one or more [[manual:​config:​items:​item:​custom_intervals|custom intervals]] that consist of either flexible intervals and scheduling intervals as serialized strings. Also accepts user macros. Flexible intervals could be written as two macros separated by a forward slash. Intervals are separated by a semicolon. |
Line 51: Line 51:
  
 The LLD rule filter object defines a set of conditions that can be used to filter discovered objects. It 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 ​ ^  Type  ^  Description ​ ^+^  Property ​ ^  ​[[:​manual/​api/​reference_commentary#​data_types|Type]]  ​^ ​ Description ​ ^
 | **conditions** \\ (required) | array | Set of filter conditions to use for filtering results. | | **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. | | **evaltype** \\ (required) ​ | integer | Filter condition evaluation method. \\ \\ Possible values: \\ 0 - and/or; \\ 1 - and; \\ 2 - or; \\ 3 - custom expression. |
Line 59: Line 59:
 === LLD rule filter condition === === 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: 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 ​ ^  Type  ^  Description ​ ^+^  Property ​ ^  ​[[:​manual/​api/​reference_commentary#​data_types|Type]]  ​^ ​ Description ​ ^
 | **macro** \\ (required) | string | LLD macro to perform the check on. | | **macro** \\ (required) | string | LLD macro to perform the check on. |
 | **value** \\ (required) | string | Value to compare with. | | **value** \\ (required) | string | Value to compare with. |
Line 69: Line 69:
 ==== LLD macro path ==== ==== LLD macro path ====
 The LLD macro path has the following properties: The LLD macro path has the following properties:
-^  Property ​ ^  Type  ^  Description ​ ^+^  Property ​ ^  ​[[:​manual/​api/​reference_commentary#​data_types|Type]]  ​^ ​ Description ​ ^
 | **lld_macro** \\ (required) | string | LLD macro. | | **lld_macro** \\ (required) | string | LLD macro. |
 | **path** \\ (required) ​ | string | Selector for value which will be assigned to corresponding macro. | | **path** \\ (required) ​ | string | Selector for value which will be assigned to corresponding macro. |
Line 75: Line 75:
 ==== LLD rule preprocessing ==== ==== LLD rule preprocessing ====
 The LLD rule preprocessing object has the following properties. The LLD rule preprocessing object has the following properties.
-^ Property ​                ^ Type    ^ Description ^+^ Property ​                ​^ ​[[:​manual/​api/​reference_commentary#​data_types|Type]]    ^ 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. | | **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. | | **params** \\ (required) | string ​ | Additional parameters used by preprocessing option. Multiple parameters are separated by LF (\n) character. |
Line 105: Line 105:
 ==== LLD rule overrides ==== ==== LLD rule overrides ====
 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: ​ 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: ​
-^  Property ​ ^  Type  ^  Description ​ ^+^  Property ​ ^  ​[[:​manual/​api/​reference_commentary#​data_types|Type]]  ​^ ​ Description ​ ^
 | **name** \\ (required) | string | Unique override name. | | **name** \\ (required) | string | Unique override name. |
 | **step** \\ (required) | integer | Unique order number of the override. | | **step** \\ (required) | integer | Unique order number of the override. |
Line 114: Line 114:
 === LLD rule override filter === === 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: ​ 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 ​ ^  Type  ^  Description ​ ^+^  Property ​ ^  ​[[:​manual/​api/​reference_commentary#​data_types|Type]]  ​^ ​ Description ​ ^
 | **evaltype** \\ (required) | integer | Override filter condition evaluation method. \\ \\ Possible values: \\ 0 - and/or; \\ 1 - and; \\ 2 - or; \\ 3 - custom expression. | | **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. | | **conditions** \\ (required) | array | Set of override filter conditions to use for matching the discovered objects. |
Line 122: Line 122:
 === LLD rule override filter condition === === 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: 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 ​ ^  Type  ^  Description ​ ^+^  Property ​ ^  ​[[:​manual/​api/​reference_commentary#​data_types|Type]]  ​^ ​ Description ​ ^
 | **macro** \\ (required) | string | LLD macro to perform the check on. | | **macro** \\ (required) | string | LLD macro to perform the check on. |
 | **value** \\ (required) | string | Value to compare with. | | **value** \\ (required) | string | Value to compare with. |
Line 130: Line 130:
 === LLD rule override operation === === 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: The LLD rule override operation is combination of conditions and actions to perform on the prototype object. It has the following properties:
-^  Property ​ ^  Type  ^  Description ​ ^+^  Property ​ ^  ​[[:​manual/​api/​reference_commentary#​data_types|Type]]  ​^ ​ 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. | | **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. | | 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. |
Line 146: Line 146:
 == LLD rule override operation status == == LLD rule override operation status ==
 LLD rule override operation status that is set to discovered object. It has the following properties: LLD rule override operation status that is set to discovered object. It has the following properties:
-^  Property ​ ^  Type  ^  Description ​ ^+^  Property ​ ^  ​[[:​manual/​api/​reference_commentary#​data_types|Type]]  ​^ ​ Description ​ ^
 | **status** \\ (required) | integer | Override the status for selected object. \\ \\ Possible values: \\ 0 - Create enabled; \\ 1 - Create disabled. | | **status** \\ (required) | integer | Override the status for selected object. \\ \\ Possible values: \\ 0 - Create enabled; \\ 1 - Create disabled. |
  
 == LLD rule override operation discover == == LLD rule override operation discover ==
 LLD rule override operation discover status that is set to discovered object. It has the following properties: LLD rule override operation discover status that is set to discovered object. It has the following properties:
-^  Property ​ ^  Type  ^  Description ​ ^+^  Property ​ ^  ​[[:​manual/​api/​reference_commentary#​data_types|Type]]  ​^ ​ 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. | | **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 ==
 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 period is an update interval value (supports custom intervals) that is set to discovered item. It has the following properties:
-^  Property ​ ^  Type  ^  Description ​ ^+^  Property ​ ^  ​[[:​manual/​api/​reference_commentary#​data_types|Type]]  ​^ ​ Description ​ ^
 | **delay** \\ (required) | string | Override the update interval of the item prototype. Accepts seconds or a time unit with suffix (30s,​1m,​2h,​1d) as well as flexible and scheduling intervals and user macros or LLD macros. Multiple intervals are separated by a semicolon. | | **delay** \\ (required) | string | Override the update interval of the item prototype. Accepts seconds or a time unit with suffix (30s,​1m,​2h,​1d) as well as flexible and scheduling intervals and user macros or LLD macros. Multiple intervals are separated by a semicolon. |
  
 == LLD rule override operation history == == LLD rule override operation history ==
 LLD rule override operation history value that is set to discovered item. It has the following properties: LLD rule override operation history value that is set to discovered item. It has the following properties:
-^  Property ​ ^  Type  ^  Description ​ ^+^  Property ​ ^  ​[[:​manual/​api/​reference_commentary#​data_types|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. | | **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 ==
 LLD rule override operation trends value that is set to discovered item. It has the following properties: LLD rule override operation trends value that is set to discovered item. It has the following properties:
-^  Property ​ ^  Type  ^  Description ​ ^+^  Property ​ ^  ​[[:​manual/​api/​reference_commentary#​data_types|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. | | **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 ==
 LLD rule override operation severity value that is set to discovered trigger. It has the following properties: LLD rule override operation severity value that is set to discovered trigger. It has the following properties:
-^  Property ​ ^  Type  ^  Description ​ ^+^  Property ​ ^  ​[[:​manual/​api/​reference_commentary#​data_types|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.| | **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 ==
 LLD rule override operation tag object contains tag name and values that are set to discovered trigger. It has the following properties: 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 ​ ^+^  Property ​ ^  ​[[:​manual/​api/​reference_commentary#​data_types|Type]]  ​^ ​ Description ​ ^
 | **tag** \\ (required) | string | Override the tag name of trigger prototype tags. | | **tag** \\ (required) | string | Override the tag name of trigger prototype tags. |
 | value | string | Override the tag value of trigger prototype tags. | | value | string | Override the tag value of trigger prototype tags. |
Line 182: Line 182:
 == LLD rule override operation template == == LLD rule override operation template ==
 LLD rule override operation template object that is linked to discovered host. It has the following properties: LLD rule override operation template object that is linked to discovered host. It has the following properties:
-^  Property ​ ^  Type  ^  Description ​ ^+^  Property ​ ^  ​[[:​manual/​api/​reference_commentary#​data_types|Type]]  ​^ ​ Description ​ ^
 | **templateid** \\ (required) | string | Override the template of host prototype linked templates. | | **templateid** \\ (required) | string | Override the template of host prototype linked templates. |
  
 == LLD rule override operation inventory == == LLD rule override operation inventory ==
 LLD rule override operation inventory mode value that is set to discovered host. It has the following properties: LLD rule override operation inventory mode value that is set to discovered host. It has the following properties:
-^  Property ​ ^  Type  ^  Description ​ ^+^  Property ​ ^  ​[[:​manual/​api/​reference_commentary#​data_types|Type]]  ​^ ​ Description ​ ^
 | **inventory_mode** \\ (required) | integer | Override the host prototype inventory mode. \\ \\ Possible values are: \\ -1 - disabled; \\ 0 - //​(default)//​ manual; \\ 1 - automatic.| | **inventory_mode** \\ (required) | integer | Override the host prototype inventory mode. \\ \\ Possible values are: \\ -1 - disabled; \\ 0 - //​(default)//​ manual; \\ 1 - automatic.|