> LLD rule object

    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:

    PropertyTypeDescription
    conditionsarraySet of filter conditions to use for filtering results.

    :
    - required
    evaltypeintegerFilter condition evaluation method.

    Possible values:
    0 - and/or;
    1 - and;
    2 - or;
    3 - custom expression.

    Property behavior:
    - required
    eval_formulastringGenerated 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.

    :
    - read-only
    formulastringUser-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 formulaid. The IDs used in the expression must exactly match the ones defined in the filter conditions: no condition can remain unused or omitted.

    Property behavior:
    - required if evaltype is set to “custom expression”

    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:

    PropertyTypeDescription
    macrostringLLD macro to perform the check on.

    :
    - required
    valuestringValue to compare with.

    Property behavior:
    - required
    formulaidstringArbitrary 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.
    operatorintegerCondition operator.

    Possible values:
    8 - (default) matches regular expression;
    9 - does not match regular expression;
    12 - exists;
    13 - does not exist.

    To better understand how to use filters with various types of expressions, see examples on the and discoveryrule.create method pages.

    The LLD macro path has the following properties:

    PropertyTypeDescription
    lld_macrostringLLD macro.

    :
    - required
    pathstringSelector for value which will be assigned to corresponding macro.

    Property behavior:
    - required

    The LLD rule preprocessing object has the following properties.

    PropertyTypeDescription
    typeintegerThe 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;
    27 - XML to JSON;
    28 - SNMP walk value;
    29 - SNMP walk to JSON.

    :
    - required
    paramsstringAdditional parameters used by preprocessing option. Multiple parameters are separated by the newline (\n) character.

    Property behavior:
    - required if type is set to “Regular expression matching” (5), “XML XPath” (11), “JSONPath” (12), “Does not match regular expression” (15), “Check for error in JSON” (16), “Check for error in XML” (17), “Discard unchanged with heartbeat” (20), “Prometheus to JSON” (23), “CSV to JSON” (24), “Replace” (25), “SNMP walk value” (28), or “SNMP walk to JSON” (29)
    error_handlerintegerAction 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.

    :
    - required if type is set to “Regular expression matching” (5), “XML XPath” (11), “JSONPath” (12), “Does not match regular expression” (15), “Check for error in JSON” (16), “Check for error in XML” (17), “Prometheus to JSON” (23), “CSV to JSON” (24), “XML to JSON” (27), “SNMP walk value” (28), or “SNMP walk to JSON” (29)
    error_handler_paramsstringError handler parameters.

    Property behavior:
    - required if error_handler is set to “Set custom value” or “Set custom error message”
    Preprocessing typeNameParameter 1Parameter 2Parameter 3Supported error handlers
    5Regular expressionpattern1output20, 1, 2, 3
    11XML XPathpath30, 1, 2, 3
    12JSONPathpath30, 1, 2, 3
    15Does not match regular expressionpattern10, 1, 2, 3
    16Check for error in JSONpath30, 1, 2, 3
    17Check for error in XMLpath30, 1, 2, 3
    20Discard unchanged with heartbeatseconds4, 5, 6
    23Prometheus to JSONpattern5, 70, 1, 2, 3
    24CSV to JSONcharacter2character20,10, 1, 2, 3
    25Replacesearch string2replacement2
    27XML to JSON0, 1, 2, 3
    28SNMP walk valueOID2Format:
    0 - Unchanged
    1 - UTF-8 from Hex-STRING
    2 - MAC from Hex-STRING
    3 - Integer from BITS
    0, 1, 2, 3
    29SNMP walk to JSON9Field name2OID prefix2Format:
    0 - Unchanged
    1 - UTF-8 from Hex-STRING
    2 - MAC from Hex-STRING
    3 - Integer from BITS
    0, 1, 2, 3

    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: <metric name>{<label name>="<label value>", ...} == <value>. Each Prometheus pattern component (metric, label name, label value and metric value) can be user macro.
    8 Prometheus output following the syntax: <label name>. 9 Supports multiple “Field name,OID prefix,Format records” records delimited by a new line character.

    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:

    PropertyDescription
    evaltypeintegerOverride filter condition evaluation method.

    Possible values:
    0 - and/or;
    1 - and;
    2 - or;
    3 - custom expression.

    Property behavior:
    - required
    conditionsarraySet of override filter conditions to use for matching the discovered objects.

    :
    - required
    eval_formulastringGenerated 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.

    Property behavior:
    - read-only
    formulastringUser-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 if evaltype is set to “custom expression”

    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:

    PropertyDescription
    macrostringLLD macro to perform the check on.

    Property behavior:
    - required
    valuestringValue to compare with.

    :
    - required
    formulaidstringArbitrary 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.
    operatorintegerCondition operator.

    Possible values:
    8 - (default) matches regular expression;
    9 - does not match regular expression;
    12 - exists;
    13 - does not exist.

    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:

    PropertyDescription
    operationobjectintegerType of discovered object to perform the action.

    Possible values:
    0 - Item prototype;
    1 - Trigger prototype;
    2 - Graph prototype;
    3 - Host prototype.

    Property behavior:
    - required
    operatorintegerOverride condition operator.

    Possible values:
    0 - (default) equals;
    1 - does not equal;
    2 - contains;
    3 - does not contain;
    8 - matches;
    9 - does not match.
    valuestringPattern to match item, trigger, graph or host prototype name depending on selected object.
    opstatusobjectOverride operation status object for item, trigger and host prototype objects.
    opdiscoverobjectOverride operation discover status object (all object types).
    opperiodobjectOverride operation period (update interval) object for item prototype object.
    ophistoryobjectOverride operation history object for item prototype object.
    optrendsobjectOverride operation trends object for item prototype object.
    opseverityobjectOverride operation severity object for trigger prototype object.
    optagarrayOverride operation tag object for trigger and host prototype objects.
    optemplatearrayOverride operation template object for host prototype object.
    opinventoryobjectOverride 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:

    PropertyTypeDescription
    statusintegerOverride the status for selected object.

    Possible values:
    0 - Create enabled;
    1 - Create disabled.

    :
    - required
    LLD rule override operation discover
    PropertyDescription
    discoverintegerOverride 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 be marked as lost.

    Property behavior:
    - required
    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:

    PropertyDescription
    historystringOverride 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.

    Property behavior:
    - required

    LLD rule override operation trends value that is set to discovered item. It has the following properties:

    PropertyTypeDescription
    trendsstringOverride 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.

    :
    - required
    LLD rule override operation severity

    LLD rule override operation severity value that is set to discovered trigger. It has the following properties:

    PropertyDescription
    severityintegerOverride the severity of trigger prototype.

    Possible values:
    0 - (default) not classified;
    1 - information;
    2 - warning;
    3 - average;
    4 - high;
    5 - disaster.

    Property behavior:
    - required
    LLD rule override operation tag

    LLD rule override operation tag object contains tag name and value that are set to discovered object. It has the following properties:

    PropertyTypeDescription
    tagstringNew tag name.

    :
    - required
    valuestringNew tag value.
    LLD rule override operation template

    LLD rule override operation template object that is linked to discovered host. It has the following properties:

    PropertyDescription
    templateidstringOverride the template of host prototype linked templates.

    Property behavior:
    - required
    LLD rule override operation inventory