Los siguientes objetos están directamente relacionados con la API discoveryrule
.
The low-level discovery rule object has the following properties.
Property | Type | Description |
---|---|---|
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 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. Optional for Zabbix trapper, dependent items and for Zabbix agent (active) with mqtt.get key. |
hostid (required) |
string | ID of the host that the LLD rule belongs to. |
interfaceid (required) |
string | ID of the LLD rule's host interface. Used only for host LLD rules. Optional for Zabbix agent (active), Zabbix internal, Zabbix trapper and database monitor LLD rules. |
key_ (required) |
string | LLD rule key. |
name (required) |
string | Name of the LLD rule. |
type (required) |
integer | Type of the LLD rule. Possible values: 0 - Zabbix agent; 2 - Zabbix trapper; 3 - simple check; 5 - Zabbix internal; 7 - Zabbix agent (active); 10 - external check; 11 - database monitor; 12 - IPMI agent; 13 - SSH agent; 14 - TELNET agent; 16 - JMX agent; 18 - Dependent item; 19 - HTTP agent; 20 - SNMP agent; 21 - Script. |
url (required) |
string | URL string, required for HTTP agent LLD rule. Supports user macros, {HOST.IP}, {HOST.CONN}, {HOST.DNS}, {HOST.HOST}, {HOST.NAME}, {ITEM.ID}, {ITEM.KEY}. |
allow_traps | integer | HTTP agent LLD rule field. Allow to populate value as in trapper item type also. 0 - (default) Do not allow to accept incoming data. 1 - Allow to accept incoming data. |
authtype | integer | Used only by SSH agent or HTTP agent LLD rules. SSH agent authentication method possible values: 0 - (default) password; 1 - public key. HTTP agent authentication method possible values: 0 - (default) none 1 - basic 2 - NTLM |
description | string | Description of the LLD rule. |
error | string | (readonly) Error text if there are problems updating the LLD rule. |
follow_redirects | integer | HTTP agent LLD rule field. Follow response redirects while pooling data. 0 - Do not follow redirects. 1 - (default) Follow redirects. |
headers | object | HTTP agent LLD rule field. Object with HTTP(S) request headers, where header name is used as key and header value as value. Example: { "User-Agent": "Zabbix" } |
http_proxy | string | HTTP agent LLD rule field. HTTP(S) proxy connection string. |
ipmi_sensor | string | IPMI sensor. Used only by IPMI LLD rules. |
jmx_endpoint | string | JMX agent custom connection string. Default value: service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi |
lifetime | string | Time period after which items that are no longer discovered will be deleted. Accepts seconds, time unit with suffix and user macro. Default: 30d . |
master_itemid | integer | Master item ID. Recursion up to 3 dependent items and maximum count of dependent items equal to 999 are allowed. Discovery rule cannot be master item for another discovery rule. Required for Dependent item. |
output_format | integer | HTTP agent LLD rule field. Should response be converted to JSON. 0 - (default) Store raw. 1 - Convert to JSON. |
params | string | Additional parameters depending on the type of the LLD rule: - executed script for SSH and Telnet LLD rules; - SQL query for database monitor LLD rules; - formula for calculated LLD rules. |
parameters | array | Additional parameters for script type LLD rule. Array of objects with 'name' and 'value' properties, where name must be unique. |
password | string | Password for authentication. Used by simple check, SSH, Telnet, database monitor, JMX and HTTP agent LLD rules. |
post_type | integer | HTTP agent LLD rule field. Type of post data body stored in posts property. 0 - (default) Raw data. 2 - JSON data. 3 - XML data. |
posts | string | HTTP agent LLD rule field. HTTP(S) request body data. Used with post_type. |
privatekey | string | Name of the private key file. |
publickey | string | Name of the public key file. |
query_fields | array | HTTP agent LLD rule field. Query parameters. Array of objects with 'key':'value' pairs, where value can be empty string. |
request_method | integer | HTTP agent LLD rule field. Type of request method. 0 - (default) GET 1 - POST 2 - PUT 3 - HEAD |
retrieve_mode | integer | HTTP agent LLD rule field. What part of response should be stored. 0 - (default) Body. 1 - Headers. 2 - Both body and headers will be stored. For request_method HEAD only 1 is allowed value. |
snmp_oid | string | SNMP OID. |
ssl_cert_file | string | HTTP agent LLD rule field. Public SSL Key file path. |
ssl_key_file | string | HTTP agent LLD rule field. Private SSL Key file path. |
ssl_key_password | string | HTTP agent LLD rule field. Password for SSL Key file. |
state | integer | (readonly) State of the LLD rule. Possible values: 0 - (default) normal; 1 - not supported. |
status | integer | Status of the LLD rule. Possible values: 0 - (default) enabled LLD rule; 1 - disabled LLD rule. |
status_codes | string | HTTP agent LLD rule field. Ranges of required HTTP status codes separated by commas. Also supports user macros as part of comma separated list. Example: 200,200-{$M},{$M},200-400 |
templateid | string | (readonly) ID of the parent template LLD rule. |
timeout | string | Item data polling request timeout. Used for HTTP agent and script LLD rules. Supports user macros. default: 3s maximum value: 60s |
trapper_hosts | string | Allowed hosts. Used by trapper LLD rules or HTTP agent LLD rules. |
username | string | Username for authentication. Used by simple check, SSH, Telnet, database monitor, JMX and HTTP agent LLD rules. Required by SSH and Telnet LLD rules. |
uuid | string | Universal unique identifier, used for linking imported LLD rules to already existing ones. Used only for LLD rules on templates. Auto-generated, if not given. For update operations this field is readonly. |
verify_host | integer | HTTP agent LLD rule field. Validate host name in URL is in Common Name field or a Subject Alternate Name field of host certificate. 0 - (default) Do not validate. 1 - Validate. |
verify_peer | integer | HTTP agent LLD rule field. Validate is host certificate authentic. 0 - (default) Do not validate. 1 - Validate. |
El objeto de filtro de regla LLD define un conjunto de condiciones que se pueden utilizar para filtrar objetos descubiertos. Tiene las siguientes propiedades:
Propiedad | Tipo | Descripción |
---|---|---|
conditions (obligatorio) |
matriz | Conjunto de condiciones de filtro a utilizar para filtrar resultados. |
evaltype (obligatorio) |
entero | Método de evaluación de la condición del filtro. Valores posibles: 0 - y/o; 1 - y; 2 - o; 3 - expresión personalizada. |
eval_formula | string | (readonly) Expresión generada que se utilizará para evaluar las condiciones del filtro. La expresión contiene ID que hacen referencia a condiciones de filtro específicas mediante su "formulaid". El valor de eval_formula es igual al valor de formula para filtros con una expresión personalizada. |
formula | cadena | Expresión definida por el usuario que se utilizará para evaluar las condiciones de los filtros con una expresión personalizada. La expresión debe contener ID que hagan referencia a condiciones de filtro específicas mediante su "formulaid". Los ID utilizados en la expresión deben coincidir exactamente con los definidos en las condiciones del filtro: ninguna condición puede permanecer sin usar u omitir. Obligatorio para filtros de expresión personalizados. |
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 |
---|---|---|
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; 12 - exists; 13 - does not exist. |
To better understand how to use filters with various types of expressions, see examples on the discoveryrule.get and discoveryrule.create method pages.
La ruta de macro LLD tiene las siguientes propiedades:
Propiedad | Tipo | Descripción |
---|---|---|
lld_macro (obligatorio) |
cadena | Macro LLD. |
path (obligatorio) |
cadena | Selector del valor que se asignará a la macro correspondiente. |
The LLD rule preprocessing object has the following properties.
Property | 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; 27 - XML to JSON. |
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. |
The following parameters and error handlers are supported for each preprocessing type.
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 | ||
27 | XML to JSON | 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>
.
El objeto de anulación de regla LLD define un conjunto de reglas (filtros, condiciones y operaciones) que se utilizan para anular las propiedades de diferentes objetos prototipo. Tiene las siguientes propiedades:
Propiedad | Tipo | Descripción |
---|---|---|
name (obligatoria) |
cadena | Nombre único de anulación. |
step (obligatoria) |
entero | Número de orden único de la anulación. |
stop | entero | Detener el procesamiento de las siguientes anulaciones si coinciden. Valores posibles: 0 - (predeterminado) no detener el procesamiento de las anulaciones; 1 - detener el procesamiento de las anulaciones si el filtro coincide. |
filter | objeto | Anular filtro. |
operations | matriz | Operaciones de anulación. |
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 |
---|---|---|
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 formulaid . 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. |
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 |
---|---|---|
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; 12 - exists; 13 - does not exist. |
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 |
---|---|---|
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 and host prototype objects. |
optemplate | array | Override operation template object for host prototype object. |
opinventory | object | Override operation inventory object for host prototype object. |
La regla LLD anula el estado de operación establecido en objeto descubierto. Tiene las siguientes propiedades:
Propiedad | Tipo | Descripción |
---|---|---|
status (obligatoria) |
entero | Anula el estado del objeto seleccionado. Valores posibles: 0 - Crear habilitado; 1 - Crear deshabilitado. |
Estado de descubrimiento de operación de anulación de regla LLD que está establecido en el objeto descubierto. Tiene las siguientes propiedades:
Propiedad | Tipo | Descripción |
---|---|---|
discover (obligatoria) |
entero | Anula el estado de descubrimiento del objeto seleccionado. Valores posibles: 0 - Sí, continúa descubriendo los objetos; 1 - No, no se descubrirán nuevos objetos y los existentes se marcará como perdido. |
El período de operación de anulación de regla LLD es un valor de intervalo de actualización (admite intervalos personalizados) que se establece como elemento descubierto. Tiene las siguientes propiedades:
Propiedad | Tipo | Descripción |
---|---|---|
delay (obligatoria) |
cadena | Anula el intervalo de actualización del prototipo del artículo. Acepta segundos o una unidad de tiempo con sufijo (30s,1m,2h,1d), así como intervalos flexibles y de programación y macros de usuario o macros LLD. Varios intervalos están separados por un punto y coma. |
La regla LLD anula el valor del historial de operaciones que está configurado como métrica descubierta. Tiene las siguientes propiedades:
Propiedad | Tipo | Descripción |
---|---|---|
history (obligatoria) |
cadena | Anula el historial del prototipo de métrica, que es una unidad de tiempo de cuánto tiempo se deben almacenar los datos del historial. También acepta macros de usuario y macros LLD. |
La regla LLD anula el valor de tendencias de operación que se establece en la métrica descubierta. Tiene las siguientes propiedades:
Propiedad | Tipo | Descripción |
---|---|---|
trends (obligatorio) |
string | Anula las tendencias del prototipo de la métrica, que es una unidad de tiempo de cuánto tiempo se deben almacenar los datos de tendencias. También acepta macros de usuario y macros LLD. |
La regla LLD anula el valor de gravedad de la operación que está configurada como iniciador descubierto. Tiene las siguientes propiedades:
Propiedad | Tipo | Descripción |
---|---|---|
severity (obligatoria) |
entero | Anula la gravedad del prototipo de iniciador. Valores posibles: 0 - (predeterminado) no clasificado; 1 - información; 2 - advertencia;<br >3 - promedio; 4 - alto; 5 - desastre. |
El objeto de etiqueta de operación de anulación de regla LLD contiene el nombre y el valor de la etiqueta que están configurados para el objeto descubierto. Tiene las siguientes propiedades:
Propiedad | Tipo | Descripción |
---|---|---|
tag (obligatoria) |
cadena | Nuevo nombre de etiqueta. |
value | cadena | Nuevo valor de etiqueta. |
Objeto de plantilla de operación de anulación de regla LLD que está vinculado a un equipo descubierto. Tiene las siguientes propiedades:
Propiedad | Tipo | Descripción |
---|---|---|
templateid (obligatoria) |
cadena | Anular la plantilla de prototipo de equipo de las plantillas vinculadas. |
La regla LLD anula el valor del modo de inventario de operación que está establecido en equipo descubierto. Tiene las siguientes propiedades:
Propiedad | Tipo | Descripción |
---|---|---|
inventory_mode (obligatoria) |
entero | Anula el modo de inventario del prototipo del equipo. Valores posibles: -1 - deshabilitado; 0 - (predeterminado) manual; 1 - automático. |