Vienuma prototipa objekts
Tālāk norādītie objekti ir tieši saistīti ar itemprototype API.
Vienuma prototips
Vienuma prototipa objektam ir šādas īpašības.
| Property | Type | Description |
|---|---|---|
| itemid | ID | Vienuma prototipa ID. Property behavior: - read-only - required for update operations |
| delay | string | Vienuma prototipa atjaunināšanas intervāls. Pieņem sekundes vai laika vienību ar sufiksu (piemēram, 30s, 1m, 2h, 1d) un, pēc izvēles, vienu vai vairākus custom intervals, visus atdalot ar semikoliem. Pielāgotie intervāli var būt fleksiblo un plānošanas intervālu kombinācija. Pieņem lietotāja makro un LLD makro. Ja tiek izmantots, vērtībai jābūt vienam makro. Vairāki makro vai makro kopā ar tekstu netiek atbalstīti. Fleksīvos intervālus var rakstīt kā divus makro, kas atdalīti ar slīpsvītru (piemēram, {$FLEX_INTERVAL}/{$FLEX_PERIOD}).Piemērs: 1h;wd1-5h9-18;{$Macro1}/1-7,00:00-24:00;0/6-7,12:00-24:00;{$Macro2}/{$Macro3}Property behavior: - required if type is set to "Zabbix agent" (0), "Simple check" (3), "Zabbix internal" (5), "External check" (10), "Database monitor" (11), "IPMI agent" (12), "SSH agent" (13), "TELNET agent" (14), "Calculated" (15), "JMX agent" (16), "HTTP agent" (19), "SNMP agent" (20), "Script" (21), "Browser" (22), or if type is set to "Zabbix agent (active)" (7) and key_ does not contain "mqtt.get" |
| hostid | ID | Hosta ID, kuram pieder vienuma prototips. Property behavior: - constant - required for create operations |
| interfaceid | ID | Vienuma prototipa hosta saskarnes ID. Property behavior: - required if item prototype belongs to host and type is set to "Zabbix agent", "IPMI agent", "JMX agent", "SNMP trap", or "SNMP agent"- supported if item prototype belongs to host and type is set to "Simple check", "External check", "SSH agent", "TELNET agent", or "HTTP agent" |
| key_ | string | Vienuma prototipa atslēga. Property behavior: - required for create operations - read-only for inherited objects |
| name | string | Vienuma prototipa nosaukums. Atbalsta lietotāja makro. Property behavior: - required for create operations - read-only for inherited objects |
| type | integer | Vienuma prototipa tips. 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; 22 - Browser. Property behavior: - required for create operations - read-only for inherited objects |
| url | string | URL virkne. Atbalsta LLD makro, lietotāja makro, {HOST.IP}, {HOST.CONN}, {HOST.DNS}, {HOST.HOST}, {HOST.NAME}, {ITEM.ID}, {ITEM.KEY}. Property behavior: - required if type is set to "HTTP agent"- read-only for inherited objects |
| value_type | integer | Vienuma prototipa informācijas tips. Possible values: 0 - numeric float; 1 - character; 2 - log; 3 - numeric unsigned; 4 - text; 5 - binary. Property behavior: - required for create operations - read-only for inherited objects |
| allow_traps | integer | Atļaut vērtības aizpildīšanu līdzīgi kā trapper vienumam. 0 - (default) Neatļaut pieņemt ienākošos datus; 1 - Atļaut pieņemt ienākošos datus. Property behavior: - supported if type is set to "HTTP agent" |
| authtype | integer | Autentifikācijas metode. Possible values if type is set to "SSH agent":0 - (default) password; 1 - public key. Possible values if type is set to "HTTP agent":0 - (default) none; 1 - basic; 2 - NTLM; 3 - Kerberos; 4 - Digest. Property behavior: - supported if type is set to "SSH agent" or "HTTP agent"- read-only for inherited objects (if type is set to "HTTP agent") |
| description | string | Vienuma prototipa apraksts. |
| follow_redirects | integer | Sekot atbildes pāradresācijām datu aptaujas laikā. Possible values: 0 - Do not follow redirects; 1 - (default) Follow redirects. Property behavior: - supported if type is set to "HTTP agent"- read-only for inherited objects |
| headers | array | headers masīvs, kas tiks nosūtīts, veicot HTTP pieprasījumu. Property behavior: - supported if type is set to "HTTP agent"- read-only for inherited objects |
| history | string | Laika vienība, cik ilgi jāglabā vēstures dati. Pieņem arī lietotāja makro un LLD makro. Default: 31d. |
| http_proxy | string | HTTP(S) starpniekservera savienojuma virkne. Property behavior: - supported if type is set to "HTTP agent"- read-only for inherited objects |
| ipmi_sensor | string | IPMI sensors. Property behavior: - required if type is set to "IPMI agent" and key_ is not set to "ipmi.get"- supported if type is set to "IPMI agent"- read-only for inherited objects |
| jmx_endpoint | string | JMX aģenta pielāgota savienojuma virkne. Default: service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi Property behavior: - supported if type is set to "JMX agent" |
| logtimefmt | string | Laika formāts žurnāla ierakstos. Property behavior: - supported if value_type is set to "log"- read-only for inherited objects |
| master_itemid | ID | Galvenā vienuma ID. Atļauta rekursija līdz 3 atkarīgajiem vienumiem un vienuma prototipiem, un maksimālais atkarīgo vienumu un vienuma prototipu skaits ir 29999. Property behavior: - required if type is set to "Dependent item"- read-only for inherited objects |
| output_format | integer | Vai atbilde jāpārveido uz JSON. Possible values: 0 - (default) Store raw; 1 - Convert to JSON. Property behavior: - supported if type is set to "HTTP agent"- read-only for inherited objects |
| params | string | Papildu parametri atkarībā no vienuma prototipa tipa: - izpildāmais skripts SSH agent un TELNET agent vienuma prototipiem; - SQL vaicājums database monitor vienuma prototipiem; - formula calculated vienuma prototipiem; - skripts script un browser vienuma prototipiem. Property behavior: - required if type is set to "Database monitor", "SSH agent", "TELNET agent", "Calculated", "Script", or "Browser"- read-only for inherited objects (if type is set to "Script" or "Browser") |
| parameters | object/array | Papildu parametri, ja type ir iestatīts uz "Script" vai "Browser". Objektu masīvs ar name un value īpašībām, kur name jābūt unikālam.Property behavior: - supported if type is set to "Script" or "Browser"- read-only for inherited objects |
| password | string | Autentifikācijas parole. Property behavior: - required if type is set to "JMX agent" and username is set- supported if type is set to "Simple check", "SSH agent", "TELNET agent", "Database monitor", or "HTTP agent"- read-only for inherited objects (if type is set to "HTTP agent") |
| post_type | integer | Ziņu datu pamatnes tips, kas glabājas posts īpašībā.Possible values: 0 - (default) Raw data. 2 - JSON data. 3 - XML data. Property behavior: - supported if type is set to "HTTP agent"- read-only for inherited objects |
| posts | string | HTTP(S) pieprasījuma pamatdati. Property behavior: - required if type is set to "HTTP agent" and post_type is set to "JSON data" or "XML data"- supported if type is set to "HTTP agent" and post_type is set to "Raw data"- read-only for inherited objects |
| privatekey | string | Privātās atslēgas faila nosaukums. Property behavior: - required if type is set to "SSH agent" and authtype is set to "public key" |
| publickey | string | Publiskās atslēgas faila nosaukums. Property behavior: - required if type is set to "SSH agent" and authtype is set to "public key" |
| query_fields | array | query fields masīvs, kas tiks nosūtīts, veicot HTTP pieprasījumu. Property behavior: - supported if type is set to "HTTP agent"- read-only for inherited objects |
| request_method | integer | Pieprasījuma metodes tips. Possible values: 0 - (default) GET; 1 - POST; 2 - PUT; 3 - HEAD. Property behavior: - supported if type is set to "HTTP agent"- read-only for inherited objects |
| retrieve_mode | integer | Kura atbildes daļa jāglabā. Possible values if request_method is set to "GET", "POST", or "PUT":0 - (default) Body; 1 - Headers; 2 - Both body and headers will be stored. Possible values if request_method is set to "HEAD":1 - Headers. Property behavior: - supported if type is set to "HTTP agent"- read-only for inherited objects |
| snmp_oid | string | SNMP OID. Property behavior: - required if type is set to "SNMP agent"- read-only for inherited objects |
| ssl_cert_file | string | Publiskās SSL atslēgas faila ceļš. Property behavior: - supported if type is set to "HTTP agent"- read-only for inherited objects |
| ssl_key_file | string | Privātās SSL atslēgas faila ceļš. Property behavior: - supported if type is set to "HTTP agent"- read-only for inherited objects |
| ssl_key_password | string | Parole SSL atslēgas failam. Property behavior: - supported if type is set to "HTTP agent"- read-only for inherited objects |
| status | integer | Vienuma prototipa statuss. Possible values: 0 - (default) enabled item prototype; 1 - disabled item prototype; 3 - unsupported item prototype. |
| status_codes | string | Nepieciešamo HTTP statusa kodu diapazoni, atdalīti ar komatiem. Atbalsta arī lietotāja makro vai LLD makro kā komatiem atdalīta saraksta daļu. Example: 200,200-{$M},{$M},200-400 Property behavior: - supported if type is set to "HTTP agent"- read-only for inherited objects |
| templateid | ID | Vecākveidnes vienuma prototipa ID. Property behavior: - read-only |
| timeout | string | Vienuma datu aptaujas pieprasījuma noildze. Pieņem sekundes vai laika vienību ar sufiksu (piemēram, 30s, 1m). Pieņem arī lietotāja makro un LLD makro. Possible values range: 1-600s. Default: "" - use proxy/global settings. Property behavior: - supported if type is set to "Zabbix agent" (0), "Simple check" (3) and key_ does not start with "vmware." and "icmpping", "Zabbix agent (active)" (7), "External check" (10), "Database monitor" (11), "SSH agent" (13), "TELNET agent" (14), "HTTP agent" (19), "SNMP agent" (20) and snmp_oid starts with "walk[" or "get[", "Script" (21), "Browser" (22)- read-only for inherited objects |
| trapper_hosts | string | Atļautie hosts. Property behavior: - supported if type is set to "Zabbix trapper", or if type is set to "HTTP agent" and allow_traps is set to "Allow to accept incoming data" |
| trends | string | Laika vienība, cik ilgi jāglabā tendenču dati. Pieņem arī lietotāja makro un LLD makro. Default: 365d. Property behavior: - supported if value_type is set to "numeric float" or "numeric unsigned" |
| units | string | Vērtības vienības. Property behavior: - supported if value_type is set to "numeric float" or "numeric unsigned"- read-only for inherited objects |
| username | string | Lietotājvārds autentifikācijai. Property behavior: - required if type is set to "SSH agent" or "TELNET agent", or if type is set to "JMX agent" and password is set- supported if type is set to "Simple check", "Database monitor", or "HTTP agent"- read-only for inherited objects (if type is set to "HTTP agent") |
| uuid | string | Universāls unikāls identifikators, ko izmanto importēto vienuma prototipu sasaistīšanai ar jau esošajiem. Ja nav norādīts, tiek ģenerēts automātiski. Property behavior: - supported if the item prototype belongs to a template |
| valuemapid | ID | Saistītās vērtību kartes ID. Property behavior: - supported if value_type is set to "numeric float", "character", or "numeric unsigned"- read-only for inherited objects |
| verify_host | integer | Vai pārbaudīt, ka savienojuma hosta nosaukums atbilst tam, kas norādīts hosta sertifikātā. Possible values: 0 - (default) Do not validate; 1 - Validate. Property behavior: - supported if type is set to "HTTP agent"- read-only for inherited objects |
| verify_peer | integer | Vai pārbaudīt, ka hosta sertifikāts ir autentisks. Possible values: 0 - (default) Do not validate; 1 - Validate. Property behavior: - supported if type is set to "HTTP agent"- read-only for inherited objects |
| discover | integer | Vienuma prototipa atklāšanas statuss. Possible values: 0 - (default) new items will be discovered; 1 - new items will not be discovered and existing items will be marked as lost. |
HTTP galvene
Galvenes objektam ir šādas īpašības:
| Īpašība | Tips | Apraksts |
|---|---|---|
| name | string | HTTP galvenes nosaukums. Īpašības darbība: - obligāta |
| value | string | Galvenes vērtība. Īpašības darbība: - obligāta |
HTTP vaicājuma lauks
Vaicājuma lauka objekts definē nosaukumu un vērtību, ko izmanto URL parametra norādīšanai. Tam ir šādas īpašības:
| Īpašība | Tips | Apraksts |
|---|---|---|
| name | string | Parametra nosaukums. Īpašības darbība: - obligāts |
| value | string | Parametra vērtība. Īpašības darbība: - obligāts |
Vienuma prototipa tags
Vienuma prototipa taga objekts satur šādas īpašības.
| Property | Type | Description |
|---|---|---|
| tag | string | Vienuma prototipa taga nosaukums. Property behavior: - required |
| value | string | Vienuma prototipa taga vērtība. |
Vienuma prototipa pirmapstrāde
Vienuma prototipa pirmapstrādes objektam ir šādi rekvizīti.
| Property | Type | Description |
|---|---|---|
| type | integer | Pirmapstrādes opcijas tips. Iespējamās vērtības: 1 - Pielāgots reizinātājs; 2 - Apgriešana no labās puses; 3 - Apgriešana no kreisās puses; 4 - Apgriešana; 5 - Regulārā izteiksme; 6 - Būla vērtība uz decimāldaļu; 7 - Oktāldaļskaitlis uz decimāldaļu; 8 - Heksadecimāls uz decimāldaļu; 9 - Vienkārša izmaiņa; 10 - Izmaiņa sekundē; 11 - XML XPath; 12 - JSONPath; 13 - Diapazonā; 14 - Atbilst regulārajai izteiksmei; 15 - Neatbilst regulārajai izteiksmei; 16 - Pārbaudīt kļūdu JSON; 17 - Pārbaudīt kļūdu XML; 18 - Pārbaudīt kļūdu, izmantojot regulāro izteiksmi; 19 - Atmest nemainīto; 20 - Atmest nemainīto ar heartbeat; 21 - JavaScript; 22 - Prometheus pattern; 23 - Prometheus uz JSON; 24 - CSV uz JSON; 25 - Aizstāt; 26 - Pārbaudīt neatbalstītu; 27 - XML uz JSON; 28 - SNMP walk vērtība; 29 - SNMP walk uz JSON; 30 - SNMP get vērtība. Property behavior: - required |
| params | string | Papildu parametri, ko izmanto pirmapstrādes opcija. Vairāki parametri tiek atdalīti ar jaunas rindas (\n) rakstzīmi. Ja type ir iestatīts uz "Check unsupported", parametriem ir <scope>[\n<pattern>] sintakse, kur pattern ir regulārā izteiksme, bet scope ir viena no šīm vērtībām:-1 - atbilst jebkurai kļūdai; \ 0 - pārbaudīt, vai kļūdas ziņojums atbilst pattern; \ 1 - pārbaudīt, vai kļūdas ziņojums neatbilst pattern. Property behavior: - required if type is set to "Custom multiplier" (1), "Right trim" (2), "Left trim" (3), "Trim" (4), "Regular expression" (5), "XML XPath" (11), "JSONPath" (12), "In range" (13), "Matches regular expression" (14), "Does not match regular expression" (15), "Check for error in JSON" (16), "Check for error in XML" (17), "Check for error using regular expression" (18), "Discard unchanged with heartbeat" (20), "JavaScript" (21), "Prometheus pattern" (22), "Prometheus to JSON" (23), "CSV to JSON" (24), "Replace" (25), "Check unsupported" (26), "SNMP walk value" (28), "SNMP walk to JSON" (29), or "SNMP get value" (30) |
| error_handler | integer | Darbības tips, ko izmanto pirmapstrādes soļa kļūmes gadījumā. Iespējamās vērtības: 0 - Kļūdas ziņojumu iestata Zabbix serveris; 1 - Atmest vērtību; 2 - Iestatīt pielāgotu vērtību; 3 - Iestatīt pielāgotu kļūdas ziņojumu. Iespējamās vērtības, ja type ir iestatīts uz "Check unsupported":1 - Atmest vērtību; 2 - Iestatīt pielāgotu vērtību; 3 - Iestatīt pielāgotu kļūdas ziņojumu. Property behavior: - required if type is set to "Custom multiplier" (1), "Regular expression" (5), "Boolean to decimal" (6), "Octal to decimal" (7), "Hexadecimal to decimal" (8), "Simple change" (9), "Change per second" (10), "XML XPath" (11), "JSONPath" (12), "In range" (13), "Matches regular expression" (14), "Does not match regular expression" (15), "Check for error in JSON" (16), "Check for error in XML" (17), "Check for error using regular expression" (18), "Prometheus pattern" (22), "Prometheus to JSON" (23), "CSV to JSON" (24), "Check unsupported" (26), "XML to JSON" (27), "SNMP walk value" (28), "SNMP walk to JSON" (29), or "SNMP get value" (30) |
| error_handler_params | string | Kļūdu apstrādātāja parametri. Property behavior: - required if error_handler is set to "Set custom value" or "Set custom error message" |
Tālāk norādītie parametri un kļūdu apstrādātāji tiek atbalstīti katram pirmapstrādes tipam.
| Preprocessing type | Name | Parameter 1 | Parameter 2 | Parameter 3 | Supported error handlers |
|---|---|---|---|---|---|
| 1 | Custom multiplier | number1, 6 | 0, 1, 2, 3 | ||
| 2 | Right trim | list of characters2 | |||
| 3 | Left trim | list of characters2 | |||
| 4 | Trim | list of characters2 | |||
| 5 | Regular expression | pattern3 | output2 | 0, 1, 2, 3 | |
| 6 | Boolean to decimal | 0, 1, 2, 3 | |||
| 7 | Octal to decimal | 0, 1, 2, 3 | |||
| 8 | Hexadecimal to decimal | 0, 1, 2, 3 | |||
| 9 | Simple change | 0, 1, 2, 3 | |||
| 10 | Change per second | 0, 1, 2, 3 | |||
| 11 | XML XPath | path4 | 0, 1, 2, 3 | ||
| 12 | JSONPath | path4 | 0, 1, 2, 3 | ||
| 13 | In range | min1, 6 | max1, 6 | 0, 1, 2, 3 | |
| 14 | Matches regular expression | pattern3 | 0, 1, 2, 3 | ||
| 15 | Does not match regular expression | pattern3 | 0, 1, 2, 3 | ||
| 16 | Check for error in JSON | path4 | 0, 1, 2, 3 | ||
| 17 | Check for error in XML | path4 | 0, 1, 2, 3 | ||
| 18 | Check for error using regular expression | pattern3 | output2 | 0, 1, 2, 3 | |
| 19 | Discard unchanged | ||||
| 20 | Discard unchanged with heartbeat | seconds5, 6 | |||
| 21 | JavaScript | script2 | |||
| 22 | Prometheus pattern | pattern6, 7 | value, label, function |
output8, 9 | 0, 1, 2, 3 |
| 23 | Prometheus to JSON | pattern6, 7 | 0, 1, 2, 3 | ||
| 24 | CSV to JSON | character2 | character2 | 0,1 | 0, 1, 2, 3 |
| 25 | Replace | search string2 | replacement2 | ||
| 26 | Check unsupported | scope1 | pattern3, 6 | 1, 2, 3 | |
| 27 | XML to JSON | 0, 1, 2, 3 | |||
| 28 | SNMP walk value | OID2 | Format: 0 - Unchanged 1 - UTF-8 from Hex-STRING 2 - MAC from Hex-STRING 3 - Integer from BITS |
0, 1, 2, 3 | |
| 29 | SNMP walk to JSON10 | Field name2 | OID prefix2 | Format: 0 - Unchanged 1 - UTF-8 from Hex-STRING 2 - MAC from Hex-STRING 3 - Integer from BITS |
0, 1, 2, 3 |
| 30 | SNMP get value | Format: 1 - UTF-8 from Hex-STRING 2 - MAC from Hex-STRING 3 - Integer from BITS |
0, 1, 2, 3 | ||
1 integer or floating-point number
2 string
3 regular expression
4 JSONPath or XML XPath
5 positive integer (with support of time suffixes, e.g. 30s, 1m, 2h,
1d)
6 user macro, 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 or LLD macro.
8 Prometheus output following the syntax: <label name> (can be a user macro or an LLD macro) if label is selected as the
second parameter.
9 One of the aggregation functions: sum, min, max, avg, count if function is selected as the second
parameter.
10 Supports multiple "Field name,OID prefix,Format records" records delimited by a new line character.