This is the documentation page for an unsupported version of Zabbix.
Is this not what you were looking for? Switch to the current version or choose one from the drop-down menu.

> Item object

The following objects are directly related to the item API.

Item

Web items cannot be directly created, updated or deleted via the Zabbix API.

The item object has the following properties.

Property Type Description
itemid string (readonly) ID of the item.
delay
(required)
string Update interval of the item. 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 or Dependent item.
hostid
(required)
string ID of the host or template that the item belongs to.

For update operations this field is readonly.
interfaceid
(required)
string ID of the item's host interface.

Not required for template items. Optional for Zabbix agent (active), Zabbix internal, Zabbix trapper, Dependent item, Zabbix aggregate, database monitor and calculated items.
key_
(required)
string Item key.
name
(required)
string Name of the item.
type
(required)
integer Type of the item.

Possible values:
0 - Zabbix agent;
1 - SNMPv1 agent;
2 - Zabbix trapper;
3 - simple check;
4 - SNMPv2 agent;
5 - Zabbix internal;
6 - SNMPv3 agent;
7 - Zabbix agent (active);
8 - Zabbix aggregate;
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
value_type
(required)
integer Type of information of the item.

Possible values:
0 - numeric float;
1 - character;
2 - log;
3 - numeric unsigned;
4 - text.
authtype integer SSH authentication method. Used only by SSH agent items.

Possible values:
0 - (default) password;
1 - public key.
description string Description of the item.
error string (readonly) Error text if there are problems updating the item.
flags integer (readonly) Origin of the item.

Possible values:
0 - a plain item;
4 - a discovered item.
history string A time unit of how long the history data should be stored. Also accepts user macro.

Default: 90d.
inventory_link integer ID of the host inventory field that is populated by the item.

Refer to the host inventory page for a list of supported host inventory fields and their IDs.

Default: 0.
ipmi_sensor string IPMI sensor. Used only by IPMI items.
lastclock timestamp (readonly) Time when the item was last updated.

This property will only return a value for the period configured in ZBX_HISTORY_PERIOD.
lastns integer (readonly) Nanoseconds when the item was last updated.

This property will only return a value for the period configured in ZBX_HISTORY_PERIOD.
lastvalue string (readonly) Last value of the item.

This property will only return a value for the period configured in ZBX_HISTORY_PERIOD.
logtimefmt string Format of the time in log entries. Used only by log items.
mtime timestamp Time when the monitored log file was last updated. Used only by log items.
params string Additional parameters depending on the type of the item:
- executed script for SSH and Telnet items;
- SQL query for database monitor items;
- formula for calculated items.
password string Password for authentication. Used by simple check, SSH, Telnet, database monitor and JMX items.
port string Port monitored by the item. Used only by SNMP items.
prevvalue string (readonly) Previous value of the item.

This property will only return a value for the period configured in ZBX_HISTORY_PERIOD.
privatekey string Name of the private key file.
publickey string Name of the public key file.
snmp_community string SNMP community. Used only by SNMPv1 and SNMPv2 items.
snmp_oid string SNMP OID.
snmpv3_authpassphrase string SNMPv3 auth passphrase. Used only by SNMPv3 items.
snmpv3_authprotocol integer SNMPv3 authentication protocol. Used only by SNMPv3 items.

Possible values:
0 - (default) MD5;
1 - SHA.
snmpv3_contextname string SNMPv3 context name. Used only by SNMPv3 items.
snmpv3_privpassphrase string SNMPv3 priv passphrase. Used only by SNMPv3 items.
snmpv3_privprotocol integer SNMPv3 privacy protocol. Used only by SNMPv3 items.

Possible values:
0 - (default) DES;
1 - AES.
snmpv3_securitylevel integer SNMPv3 security level. Used only by SNMPv3 items.

Possible values:
0 - noAuthNoPriv;
1 - authNoPriv;
2 - authPriv.
snmpv3_securityname string SNMPv3 security name. Used only by SNMPv3 items.
state integer (readonly) State of the item.

Possible values:
0 - (default) normal;
1 - not supported.
status integer Status of the item.

Possible values:
0 - (default) enabled item;
1 - disabled item.
templateid string (readonly) ID of the parent template item.

Hint: Use the hostid property to specify the template that the item belongs to.
trapper_hosts string Allowed hosts. Used only by trapper items.
trends string A time unit of how long the trends data should be stored. Also accepts user macro.

Default: 365d.
units string Value units.
username string Username for authentication. Used by simple check, SSH, Telnet, database monitor and JMX items.

Required by SSH and Telnet items.
valuemapid string ID of the associated value map.
jmx_endpoint string JMX agent custom connection string.

Default value:
service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi
master_itemid integer Master item ID.
Recursion up to 3 dependent items and maximum count of dependent items equal to 999 are allowed.

Required by Dependent items.

Item preprocessing

The item preprocessing object has the following properties.

Property Type Description
type
(required)
integer The preprocessing option type.

Possible values:
1 - Custom multiplier;
2 - Right trim;
3 - Left trim;
4 - Trim;
5 - Regular expression matching;
6 - Boolean to decimal;
7 - Octal to decimal;
8 - Hexadecimal to decimal;
9 - Simple change;
10 - Change per second.
params
(required)
string Additional parameters used by preprocessing option. Multiple parameters are separated by LF (\n) character.