De volgende objecten zijn direct gerelateerd aan de itemprototype
API.
Het item prototype object heeft de volgende eigenschappen.
Property | Type | Description |
---|---|---|
itemid | string | (readonly) ID of the item prototype. |
delay (required) |
string | Update interval of the item prototype. Accepts seconds or a time unit with suffix (30s,1m,2h,1d). Optionally one or more custom intervals can be specified either as flexible intervals or scheduling. Multiple intervals are separated by a semicolon. User macros and LLD macros may be used. A single macro has to fill the whole field. Multiple macros in a field or macros mixed with text are not supported. Flexible intervals may be written as two macros separated by a forward slash (e.g. {$FLEX_INTERVAL}/{$FLEX_PERIOD} ).Optional for Zabbix trapper, dependent items and for Zabbix agent (active) with mqtt.get key. |
hostid (required) |
string | ID of the host that the item prototype belongs to. For update operations this field is readonly. |
ruleid (required) |
string | ID of the LLD rule that the item belongs to. For update operations this field is readonly. |
interfaceid (required) |
string | ID of the item prototype's host interface. Used only for host item prototypes. Optional for Zabbix agent (active), Zabbix internal, Zabbix trapper, Dependent item, database monitor and calculated item prototypes. |
key_ (required) |
string | Item prototype key. |
name (required) |
string | Name of the item prototype. |
type (required) |
integer | Type of the item prototype. 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; 15 - calculated; 16 - JMX agent; 17 - SNMP trap; 18 - Dependent item; 19 - HTTP agent; 20 - SNMP agent; 21 - Script. |
url (required) |
string | URL string required only for HTTP agent item prototypes. Supports LLD macros, user macros, {HOST.IP}, {HOST.CONN}, {HOST.DNS}, {HOST.HOST}, {HOST.NAME}, {ITEM.ID}, {ITEM.KEY}. |
value_type (required) |
integer | Type of information of the item prototype. Possible values: 0 - numeric float; 1 - character; 2 - log; 3 - numeric unsigned; 4 - text. |
allow_traps | integer | HTTP agent item prototype 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 item prototypes or HTTP agent item prototypes. 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 3 - Kerberos |
description | string | Description of the item prototype. |
follow_redirects | integer | HTTP agent item prototype field. Follow response redirects while pooling data. 0 - Do not follow redirects. 1 - (default) Follow redirects. |
headers | object | HTTP agent item prototype field. Object with HTTP(S) request headers, where header name is used as key and header value as value. Example: { "User-Agent": "Zabbix" } |
history | string | A time unit of how long the history data should be stored. Also accepts user macro and LLD macro. Default: 90d. |
http_proxy | string | HTTP agent item prototype field. HTTP(S) proxy connection string. |
ipmi_sensor | string | IPMI sensor. Used only by IPMI item prototypes. |
jmx_endpoint | string | JMX agent custom connection string. Default value: service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi |
logtimefmt | string | Format of the time in log entries. Used only by log item prototypes. |
master_itemid | integer | Master item ID. Recursion up to 3 dependent items and item prototypes and maximum count of dependent items and item prototypes equal to 29999 are allowed. Required by Dependent items. |
output_format | integer | HTTP agent item prototype 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 item prototype: - executed script for SSH and Telnet item prototypes; - SQL query for database monitor item prototypes; - formula for calculated item prototypes. |
parameters | array | Additional parameters for script item prototypes. 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 item prototypes. |
post_type | integer | HTTP agent item prototype field. Type of post data body stored in posts property. 0 - (default) Raw data. 2 - JSON data. 3 - XML data. |
posts | string | HTTP agent item prototype 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 item prototype field. Query parameters. Array of objects with 'key':'value' pairs, where value can be empty string. |
request_method | integer | HTTP agent item prototype field. Type of request method. 0 - (default) GET 1 - POST 2 - PUT 3 - HEAD |
retrieve_mode | integer | HTTP agent item prototype 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 item prototype field. Public SSL Key file path. |
ssl_key_file | string | HTTP agent item prototype field. Private SSL Key file path. |
ssl_key_password | string | HTTP agent item prototype field. Password for SSL Key file. |
status | integer | Status of the item prototype. Possible values: 0 - (default) enabled item prototype; 1 - disabled item prototype; 3 - unsupported item prototype. |
status_codes | string | HTTP agent item prototype field. Ranges of required HTTP status codes separated by commas. Also supports user macros or LLD macros as part of comma separated list. Example: 200,200-{$M},{$M},200-400 |
templateid | string | (readonly) ID of the parent template item prototype. |
timeout | string | Item data polling request timeout. Used for HTTP agent and script item prototypes. Supports user macros and LLD macros. default: 3s maximum value: 60s |
trapper_hosts | string | Allowed hosts. Used by trapper item prototypes or HTTP item prototypes. |
trends | string | A time unit of how long the trends data should be stored. Also accepts user macro and LLD macro. Default: 365d. |
units | string | Value units. |
username | string | Username for authentication. Used by simple check, SSH, Telnet, database monitor, JMX and HTTP agent item prototypes. Required by SSH and Telnet item prototypes. |
uuid | string | Universal unique identifier, used for linking imported item prototypes to already existing ones. Used only for item prototypes on templates. Auto-generated, if not given. For update operations this field is readonly. |
valuemapid | string | ID of the associated value map. |
verify_host | integer | HTTP agent item prototype 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 item prototype field. Validate is host certificate authentic. 0 - (default) Do not validate. 1 - Validate. |
discover | integer | Item prototype discovery status. Possible values: 0 - (default) new items will be discovered; 1 - new items will not be discovered and existing items will be marked as lost. |
Het item prototype tag-object heeft de volgende eigenschappen.
Eigenschap | Type | Beschrijving |
---|---|---|
tag (vereist) |
string | Naam prototype tag item. |
value | string | Waarde van prototypetag van item. |
Het object prototype voorbewerking heeft de volgende eigenschappen.
Eigenschap | Type | Beschrijving |
---|---|---|
type (vereist) |
geheel getal | Het type voorbewerkingsoptie. Mogelijke waarden: 1 - Aangepaste vermenigvuldiger; 2 - Rechts bijsnijden; 3 - Links bijsnijden; 4 - Bijsnijden; 5 - Overeenkomen met reguliere expressies; 6 - Booleaans naar decimaal; 7 - Octaal naar decimaal; 8 - Hexadecimaal naar decimaal; 9 - Eenvoudige wijziging; 10 - Wijziging per seconde; 11 - XML XPath; 12 - JSONPath; 13 - Binnen bereik; 14 - Komt overeen met reguliere expressie; 15 - Komt niet overeen met reguliere expressie; 16 - Controleer op fouten in JSON; 17 - Controleer op fouten in XML; 18 - Controleer op fouten met behulp van reguliere expressie; 19 - Verwijder ongewijzigd;<br >20 - Ongewijzigd weggooien met hartslag; 21 - JavaScript; 22 - Prometheus-patroon; 23 - Prometheus naar JSON; 24 - CSV naar JSON; 25 - Vervang;<br >26 - Controleer niet-ondersteund; 27 - XML naar JSON. |
params (verplicht) |
string | Aanvullende parameters gebruikt door voorbewerkingsoptie. Meerdere parameters worden gescheiden door een LF-teken (\n). |
error_handler (vereist) |
integer | Actietype gebruikt in geval van mislukte voorverwerkingsstap. Mogelijke waarden: 0 - Foutbericht is ingesteld door Zabbix-server;< br>1 - Waarde negeren; 2 - Aangepaste waarde instellen; 3 - Aangepaste foutmelding instellen. |
error_handler_params (vereist) |
string | Fouthandlerparameters. Gebruikt met error_handler .Moet leeg zijn als error_handler 0 of 1 is.Kan leeg zijn als error_handler 2 is.Kan niet leeg zijn als error_handler is 3. |
De volgende parameters en foutafhandelaars worden voor elk ondersteund: soort voorbewerking.
|Preprocessing type|Naam|Parameter 1|Parameter 2|Parameter 3|Ondersteunde fout-handlers| |------------------|----|-----------|-----------|- ----------|------------------------| |1|Aangepaste vermenigvuldiger|getal1, 6|<|<|0, 1, 2, 3| |2|Rechts bijsnijden|lijst met tekens2|<|<|<| |3|Links trim|lijst met tekens2|<|<|<| |4|Trim|lijst met tekens2|<|<|<| |5|Reguliere uitdrukking|patroon3|output2|<|0, 1, 2, 3| |6|Boolean naar decimaal|<|<|<|0, 1, 2, 3| |7|Octaal naar decimaal|<|<|<|0, 1, 2, 3| |8|Hexadecimaal naar decimaal|<|<|<|0, 1, 2, 3| |9|Eenvoudige wijziging|<|<|<|0, 1, 2, 3| |10|Verandering per seconde|<|<|<|0, 1, 2, 3| |11|XML XPath|pad4|<|<|0, 1, 2, 3| |12|JSONPath|pad4|<|<|0, 1, 2, 3| |13|Binnen bereik|min1, 6|max1, 6|<|0, 1, 2, 3| |14|Komt overeen met reguliere expressie|patroon3|<|<|0, 1, 2, 3| |15|Komt niet overeen met reguliere expressie|patroon3|<|<|0, 1, 2, 3| |16|Controleer op fouten in JSON|path4|<|<|0, 1, 2, 3| |17|Controleer op fouten in XML|pad4|<|<|0, 1, 2, 3| |18|Controleer op fouten met reguliere expressie|patroon3|output2|<|0, 1, 2, 3| |19|Gooi ongewijzigd weg|<|<|<|<| |20|Gooi ongewijzigd weg met hartslag|seconden5, 6|<|<|<| |21|JavaScript|script2|<|<|<| |22|Prometheus-patroon|patroon6, 7|value
, label
, function
|output8, 9|0, 1, 2, 3| |23|Prometheus naar JSON|patroon6, 7|<|<|0, 1, 2, 3| |24|CSV naar JSON|karakter2|karakter2|0,1|0, 1, 2, 3| |25|Vervangen|zoekreeks2|vervanging2|<|<| |26|Aanvinken niet ondersteund|<|<|<|1, 2, 3| |27|XML naar JSON|<|<|<|0, 1, 2, 3|
1 geheel getal of getal met drijvende komma
2 tekenreeks
3 reguliere expressie
4 JSONPath of XML XPath
5 positief geheel getal (met ondersteuning van tijdsuffixen, bijv. 30s, 1m, 2h, 1d)
6 gebruikersmacro, LLD-macro
7 Prometheus-patroon volgens de syntaxis: <metrische naam>{<labelnaam>="<labelwaarde>", ...} == <waarde>
. Elk Prometheus-patrooncomponent (metrisch, labelnaam, labelwaarde en metriek waarde) kan een gebruikersmacro of een LLD-macro zijn.
8 Prometheus-uitvoer volgens de syntaxis: <labelnaam>
(kan een gebruikersmacro of een LLD-macro zijn) als label
is geselecteerd als de tweede parameter.
9 Een van de aggregatiefuncties: sum
, min
, max
, avg
, count
als function
is geselecteerd als de tweede parameter.