Obiekt pozycji

Następujące obiekty są bezpośrednio powiązane z API item.

Item

Pozycji webowych nie można bezpośrednio tworzyć, aktualizować ani usuwać za pomocą API Zabbixa.

Obiekt item ma następujące właściwości.

Property Type Description
itemid ID ID pozycji.

Property behavior:
- read-only
- required for update operations
delay string Interwał aktualizacji pozycji.

Akceptuje sekundy lub jednostkę czasu z sufiksem (np. 30s, 1m, 2h, 1d) oraz opcjonalnie jeden lub więcej niestandardowych interwałów, wszystkie oddzielone średnikami. Niestandardowe interwały mogą być mieszanką interwałów elastycznych i harmonogramowych.

Akceptuje makra użytkownika. Jeśli są używane, wartość musi być pojedynczym makrem. Wiele makr lub makra połączone z tekstem nie są obsługiwane. Interwały elastyczne można zapisać jako dwa makra oddzielone ukośnikiem (np. {$FLEX_INTERVAL}/{$FLEX_PERIOD}).

Przykład:
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 ID hosta lub szablonu, do którego należy pozycja.

Property behavior:
- constant
- required for create operations
interfaceid ID ID interfejsu hosta dla pozycji.

Property behavior:
- required if item belongs to host and type is set to "Zabbix agent", "IPMI agent", "JMX agent", "SNMP trap", or "SNMP agent"
- supported if item belongs to host and type is set to "Simple check", "External check", "SSH agent", "TELNET agent", or "HTTP agent"
- read-only for discovered objects
key_ string Klucz pozycji.

Property behavior:
- required for create operations
- read-only for inherited objects or discovered objects
name string Nazwa pozycji.
Obsługuje makra użytkownika.

Property behavior:
- required for create operations
- read-only for inherited objects or discovered objects
name_resolved string Nazwa pozycji z rozwiniętymi makrami użytkownika.

Property behavior:
- read-only
type integer Typ pozycji.

Possible values:
0 - Zabbix agent;
2 - Zabbix trapper;
3 - Simple check;
5 - Zabbix internal;
7 - Zabbix agent (active);
9 - Web item;
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 or discovered objects
url string Łańcuch URL.
Obsługuje makra użytkownika, {HOST.IP}, {HOST.CONN}, {HOST.DNS}, {HOST.HOST}, {HOST.NAME}, {HOST.PORT}, {ITEM.ID}, {ITEM.KEY}.

Property behavior:
- required if type is set to "HTTP agent"
- read-only for inherited objects or discovered objects
value_type integer Typ informacji przechowywanej przez pozycję.

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 or discovered objects
allow_traps integer Pozwala na wypełnianie wartości podobnie jak w przypadku pozycji trapper.

0 - (default) Nie zezwalaj na przyjmowanie danych przychodzących;
1 - Zezwalaj na przyjmowanie danych przychodzących.

Property behavior:
- supported if type is set to "HTTP agent"
- read-only for discovered objects
authtype integer Metoda uwierzytelniania.

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") or discovered objects
description string Opis pozycji.

Property behavior:
- read-only for discovered objects
error string Tekst błędu, jeśli występują problemy z aktualizacją wartości pozycji.

Property behavior:
- read-only
flags integer Pochodzenie pozycji.

Possible values:
0 - a plain item;
4 - an item converted from prototype.

Property behavior:
- read-only
follow_redirects integer Podążaj za przekierowaniami odpowiedzi podczas pobierania danych.

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 or discovered objects
headers array Tablica nagłówków, które zostaną wysłane podczas wykonywania żądania HTTP.

Property behavior:
- supported if type is set to "HTTP agent"
- read-only for inherited objects or discovered objects
history string Jednostka czasu określająca, jak długo mają być przechowywane dane historyczne.
Obsługuje także makro użytkownika.

Domyślnie: 31d.

Property behavior:
- read-only for discovered objects
http_proxy string Łańcuch połączenia proxy HTTP(S).

Property behavior:
- supported if type is set to "HTTP agent"
- read-only for inherited objects or discovered objects
inventory_link integer ID pola inwentarza hosta, które jest wypełniane przez pozycję.

Listę obsługiwanych pól inwentarza hosta i ich identyfikatorów znajdziesz na stronie inwentarza hosta.

Domyślnie: 0.

Property behavior:
- supported if value_type is set to "numeric float", "character", "numeric unsigned", or "text"
- read-only for discovered objects
ipmi_sensor string Czujnik IPMI.

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 or discovered objects
jmx_endpoint string Niestandardowy ciąg połączenia agenta JMX.

Domyślna wartość: service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi

Property behavior:
- supported if type is set to "JMX agent"
- read-only for discovered objects
lastclock timestamp Czas ostatniej aktualizacji wartości pozycji.

Domyślnie wyświetlane są tylko wartości z ostatnich 24 godzin. Możesz wydłużyć ten okres, zmieniając wartość parametru Maksymalny okres wyświetlania historii w sekcji menu Administracja → Ogólne.

Property behavior:
- read-only
lastns integer Nanosekundy ostatniej aktualizacji wartości pozycji.

Domyślnie wyświetlane są tylko wartości z ostatnich 24 godzin. Możesz wydłużyć ten okres, zmieniając wartość parametru Maksymalny okres wyświetlania historii w sekcji menu Administracja → Ogólne.

Property behavior:
- read-only
lastvalue string Ostatnia wartość pozycji.

Domyślnie wyświetlane są tylko wartości z ostatnich 24 godzin. Możesz wydłużyć ten okres, zmieniając wartość parametru Maksymalny okres wyświetlania historii w sekcji menu Administracja → Ogólne.

Property behavior:
- read-only
logtimefmt string Format czasu w wpisach dziennika.

Property behavior:
- supported if value_type is set to "log"
- read-only for inherited objects or discovered objects
master_itemid ID ID pozycji nadrzędnej.

Property behavior:
- required if type is set to "Dependent item"
- read-only for inherited objects or discovered objects
output_format integer Czy odpowiedź ma zostać przekonwertowana do JSON.

0 - (default) Store raw;
1 - Convert to JSON.

Property behavior:
- supported if type is set to "HTTP agent"
- read-only for inherited objects or discovered objects
params string Dodatkowe parametry zależne od typu pozycji:
- wykonany skrypt dla pozycji SSH agent i TELNET agent;
- zapytanie SQL dla pozycji database monitor;
- formuła dla pozycji calculated;
- skrypt dla pozycji script i browser.

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") or discovered objects
parameters object/array Dodatkowe parametry, jeśli type jest ustawiony na "Script" lub "Browser". Tablica obiektów z właściwościami name i value, przy czym name musi być unikalne.

Property behavior:
- supported if type is set to "Script" or "Browser"
- read-only for inherited objects or discovered objects
password string Hasło do uwierzytelniania.

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") or discovered objects
post_type integer Typ treści żądania POST przechowywanej we właściwości posts.

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 or discovered objects
posts string Dane treści żądania HTTP(S).

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 or discovered objects
prevvalue string Poprzednia wartość pozycji.

Domyślnie wyświetlane są tylko wartości z ostatnich 24 godzin. Możesz wydłużyć ten okres, zmieniając wartość parametru Maksymalny okres wyświetlania historii w sekcji menu Administracja → Ogólne.

Property behavior:
- read-only
privatekey string Nazwa pliku klucza prywatnego.

Property behavior:
- required if type is set to "SSH agent" and authtype is set to "public key"
- read-only for discovered objects
publickey string Nazwa pliku klucza publicznego.

Property behavior:
- required if type is set to "SSH agent" and authtype is set to "public key"
- read-only for discovered objects
query_fields array Tablica pól zapytania, które zostaną wysłane podczas wykonywania żądania HTTP.

Property behavior:
- supported if type is set to "HTTP agent"
- read-only for inherited objects or discovered objects
request_method integer Typ metody żądania.

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 or discovered objects
retrieve_mode integer Która część odpowiedzi ma zostać zapisana.

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 or discovered objects
snmp_oid string OID SNMP.

Property behavior:
- required if type is set to "SNMP agent"
- read-only for inherited objects or discovered objects
ssl_cert_file string Ścieżka do pliku publicznego klucza SSL.

Property behavior:
- supported if type is set to "HTTP agent"
- read-only for inherited objects or discovered objects
ssl_key_file string Ścieżka do pliku prywatnego klucza SSL.

Property behavior:
- supported if type is set to "HTTP agent"
- read-only for inherited objects or discovered objects
ssl_key_password string Hasło do pliku klucza SSL.

Property behavior:
- supported if type is set to "HTTP agent"
- read-only for inherited objects or discovered objects
state integer Stan pozycji.

Possible values:
0 - (default) normal;
1 - not supported.

Property behavior:
- read-only
status integer Status pozycji.

Possible values:
0 - (default) enabled item;
1 - disabled item.
status_codes string Zakresy wymaganych kodów statusu HTTP, oddzielone przecinkami.
Obsługuje także makra użytkownika jako część listy rozdzielonej przecinkami.

Przykład: 200,200-{$M},{$M},200-400

Property behavior:
- supported if type is set to "HTTP agent"
- read-only for inherited objects or discovered objects
templateid ID ID nadrzędnego elementu szablonu.

Wskazówka: Użyj właściwości hostid, aby określić szablon, do którego należy pozycja.

Property behavior:
- read-only
timeout string Limit czasu żądania pobierania danych pozycji.
Akceptuje sekundy lub jednostkę czasu z sufiksem (np. 30s, 1m). Akceptuje także makra użytkownika.

Zakres możliwych wartości: 1-600s.

Domyślnie: "" - użyj ustawień proxy/globalnych.

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 and discovered objects
trapper_hosts string Dozwolone hosty.

Property behavior:
- readonly for discovered objects
- 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 Jednostka czasu określająca, jak długo mają być przechowywane dane trendów.
Obsługuje także makro użytkownika.

Domyślnie: 365d.

Property behavior:
- supported if value_type is set to "numeric float" or "numeric unsigned"
- read-only for discovered objects
units string Jednostki wartości.

Property behavior:
- supported if value_type is set to "numeric float" or "numeric unsigned"
- read-only for inherited objects or discovered objects
username string Nazwa użytkownika do uwierzytelniania.

Property behavior:
- required if type is set to "SSH agent", "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") or discovered objects
uuid string Uniwersalny unikalny identyfikator, używany do powiązania importowanej pozycji z już istniejącymi. Generowany automatycznie, jeśli nie zostanie podany.

Property behavior:
- supported if the item belongs to a template
valuemapid ID ID powiązanej mapy wartości.

Property behavior:
- supported if value_type is set to "numeric float", "character", or "numeric unsigned"
- read-only for inherited objects or discovered objects
verify_host integer Czy sprawdzać, czy nazwa hosta dla połączenia zgadza się z nazwą w certyfikacie hosta.

Possible values:
0 - (default) Do not validate;
1 - Validate.

Property behavior:
- supported if type is set to "HTTP agent"
- read-only for inherited objects or discovered objects
verify_peer integer Czy sprawdzać, czy certyfikat hosta jest autentyczny.

Possible values:
0 - (default) Do not validate;
1 - Validate.

Property behavior:
- supported if type is set to "HTTP agent"
- read-only for inherited objects or discovered objects

Nagłówek HTTP

Obiekt nagłówka ma następujące właściwości:

Właściwość Typ Opis
name string Nazwa nagłówka HTTP.

Zachowanie właściwości:
- wymagane
value string Wartość nagłówka.

Zachowanie właściwości:
- wymagane

Pole zapytania HTTP

Obiekt pola zapytania definiuje nazwę i wartość używane do określenia parametru URL. Ma następujące właściwości:

Właściwość Type Opis
name string Nazwa parametru.

Zachowanie właściwości:
- wymagane
value string Wartość parametru.

Zachowanie właściwości:
- wymagane

Tag pozycji

Obiekt tagu pozycji ma następujące właściwości.

Property Type Description
tag string Nazwa tagu pozycji.

Zachowanie właściwości:
- required
value string Wartość tagu pozycji.

Przetwarzanie wstępne pozycji

Obiekt przetwarzania wstępnego pozycji ma następujące właściwości.

Property Type Description
type integer Typ opcji przetwarzania wstępnego.

Możliwe wartości:
1 - Niestandardowy mnożnik;
2 - Przycinanie z prawej;
3 - Przycinanie z lewej;
4 - Przycinanie;
5 - Wyrażenie regularne;
6 - Wartość logiczna na dziesiętną;
7 - Ósemkowa na dziesiętną;
8 - Szesnastkowa na dziesiętną;
9 - Prosta zmiana;
10 - Zmiana na sekundę;
11 - XML XPath;
12 - JSONPath;
13 - W zakresie;
14 - Pasuje do wyrażenia regularnego;
15 - Nie pasuje do wyrażenia regularnego;
16 - Sprawdzenie błędu w JSON;
17 - Sprawdzenie błędu w XML;
18 - Sprawdzenie błędu przy użyciu wyrażenia regularnego;
19 - Odrzuć niezmienione;
20 - Odrzuć niezmienione z heartbeat;
21 - JavaScript;
22 - Wzorzec Prometheus;
23 - Prometheus do JSON;
24 - CSV do JSON;
25 - Zastąp;
26 - Sprawdź jako nieobsługiwane;
27 - XML do JSON;
28 - Wartość z przebiegu SNMP walk;
29 - SNMP walk do JSON;
30 - Wartość SNMP get.

Zachowanie właściwości:
- wymagane
params string Dodatkowe parametry używane przez opcję przetwarzania wstępnego.
Wiele parametrów jest oddzielanych znakiem nowej linii (\n).

Jeśli type jest ustawione na "Check unsupported", parametry mają składnię <scope>[\n<pattern>], gdzie pattern jest wyrażeniem regularnym, a scope jest jednym z:
-1 - dopasuj dowolny błąd;
\ 0 - sprawdź, czy komunikat błędu pasuje do pattern;
\ 1 - sprawdź, czy komunikat błędu nie pasuje do pattern.

Zachowanie właściwości:
- wymagane jeśli type jest ustawione na "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), lub "SNMP get value" (30)
error_handler integer Typ akcji używany w przypadku niepowodzenia kroku przetwarzania wstępnego.

Możliwe wartości:
0 - Komunikat błędu jest ustawiany przez serwer Zabbix;
1 - Odrzuć wartość;
2 - Ustaw wartość niestandardową;
3 - Ustaw niestandardowy komunikat błędu.

Możliwe wartości, jeśli type jest ustawione na "Check unsupported":
1 - Odrzuć wartość;
2 - Ustaw wartość niestandardową;
3 - Ustaw niestandardowy komunikat błędu.

Zachowanie właściwości:
- wymagane jeśli type jest ustawione na "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), lub "SNMP get value" (30)
error_handler_params string Parametry obsługi błędów.

Zachowanie właściwości:
- wymagane jeśli error_handler jest ustawione na "Set custom value" lub "Set custom error message"

Następujące parametry i obsługi błędów są obsługiwane dla każdego typu przetwarzania wstępnego.

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 - Bez zmian
1 - UTF-8 z Hex-STRING
2 - MAC z Hex-STRING
3 - Integer z BITS
0, 1, 2, 3
29 SNMP walk to JSON10 Field name2 OID prefix2 Format:
0 - Bez zmian
1 - UTF-8 z Hex-STRING
2 - MAC z Hex-STRING
3 - Integer z BITS
0, 1, 2, 3
30 SNMP get value Format:
1 - UTF-8 z Hex-STRING
2 - MAC z Hex-STRING
3 - Integer z BITS
0, 1, 2, 3

1 liczba zmiennoprzecinkowa (liczby całkowite są niejawnie konwertowane do wartości zmiennoprzecinkowych)
2 ciąg znaków
3 wyrażenie regularne
4 JSONPath lub XML XPath
5 dodatnia liczba całkowita (z obsługą sufiksów czasu, np. 30s, 1m, 2h, 1d)
6 makro użytkownika
7 wzorzec Prometheus zgodny ze składnią: <metric name>{<label name>="<label value>", ...} == <value>. Każdy element wzorca Prometheus (nazwa metryki, nazwa etykiety, wartość etykiety i wartość metryki) może być makrem użytkownika.
8 wynik Prometheus zgodny ze składnią: <label name> (może być makrem użytkownika), jeśli jako drugi parametr wybrano label.
9 jedna z funkcji agregujących: sum, min, max, avg, count, jeśli jako drugi parametr wybrano function.
10 obsługuje wiele rekordów "Field name,OID prefix,Format" rozdzielonych znakiem nowej linii.