# > Item object

以下对象与“item” API直接相关。

### 监控项

::: noteclassic
Web 监控项无法通过 Zabbix API
直接创建，更新或删除。
:::

监控项对象具有以下属性。

|属性                     类|说明|<|
|------------------------------|------|-|
|itemid|string|*(只读)* 监控项ID|
|**delay**<br>(required)|string|更新监控项的间隔。 接受具有后缀的秒或时间单位，并且具有或不具有由灵活间隔和调度间隔组成的一个或多个自定义间隔作为串行化字符串。也接受用户宏。 灵活的间隔可以写成两个由正斜杠分隔的宏。 间隔用分号分隔。|
|**hostid**<br>(required)|string|该项所属的主机 ID。|
|**interfaceid**<br>(required)|string|ID of the item's host interface. Used only for host items.项主机接口的ID。 仅用于主机项。<br><br>Optional for Zabbix agent (active), Zabbix internal, Zabbix trapper, Zabbix aggregate, database monitor and calculated items.适用于Zabbix代理（活动），Zabbix内部，Zabbix陷阱，Zabbix聚合，数据库监控和计算项。|
|**key\_**<br>(required)|string|Item key.|
|**name**<br>(required)|string|Name of the item. item的名称|
|**type**<br>(required)|integer|Type of the item. item的类别<br><br>Possible values:可能的值：<br>0 - Zabbix agent;<br>1 - SNMPv1 agent;<br>2 - Zabbix trapper;<br>3 - simple check;<br>4 - SNMPv2 agent;<br>5 - Zabbix internal;<br>6 - SNMPv3 agent;<br>7 - Zabbix agent (active);<br>8 - Zabbix aggregate;<br>9 - web item;<br>10 - external check;<br>11 - database monitor;<br>12 - IPMI agent;<br>13 - SSH agent;<br>14 - TELNET agent;<br>15 - calculated;<br>16 - JMX agent;<br>17 - SNMP trap.|
|**value\_type**<br>(required)|integer|Type of information of the item. item的信息类型。<br><br>Possible values:可能的值：<br>0 - numeric float;<br>1 - character;<br>2 - log;<br>3 - numeric unsigned;<br>4 - text.|
|authtype|integer|SSH authentication method. Used only by SSH agent items. SSH认证方式。 仅用于SSH代理项<br><br>Possible values: 可能的值：<br>0 - *(default)* password;<br>1 - public key.|
|data\_type|integer|Data type of the item. item的数据类型<br><br>Possible values: 可能的值：<br>0 - *(default默认)* decimal;<br>1 - octal;<br>2 - hexadecimal;<br>3 - boolean.|
|delta|integer|Value that will be stored. 将被存储的值<br><br>Possible values:可能的值：<br>0 - *(default)* as is;<br>1 - Delta, speed per second;<br>2 - Delta, simple change.|
|description|string|Description of the item.item说明|
|error|string|*(readonly)* Error text if there are problems updating the item.如果更新项目时出现问题，则显示错误文本。|
|flags|integer|*(readonly)* Origin of the item. item的来源<br><br>Possible values: 可能的值<br>0 - a plain item;<br>4 - a discovered item.|
|formula|integer/float|Custom multiplier.<br><br>Default: 1.|
|history|string|A time unit of how long the history data should be stored. Also accepts user macro. 历史数据应该存储多长时间的单位。 也接受用户宏。<br><br>Default: 90d.|
|inventory\_link|integer|ID of the host inventory field that is populated by the item. 由item填充的主机库存字段的ID。<br><br>Refer to the [host inventory page](/manual/api/reference/host/object#host_inventory) for a list of supported host inventory fields and their IDs.请参阅主机清单页面以获取支持的主机清单字段及其ID的列表。<br><br>Default: 0.|
|ipmi\_sensor|string|IPMI sensor. Used only by IPMI items. IPMI传感器 仅由IPMI项使用。|
|lastclock|timestamp|*(readonly)* Time when the item was last updated. item上次更新时间。<br><br>This property will only return a value for the period configured in [ZBX\_HISTORY\_PERIOD](/manual/web_interface/definitions). 此属性将仅返回ZBX\_HISTORY\_PERIOD中配置的时间段的值|
|lastns|integer|*(readonly)* Nanoseconds when the item was last updated. item上次更新时的纳秒<br><br>This property will only return a value for the period configured in [ZBX\_HISTORY\_PERIOD](/manual/web_interface/definitions). 此属性将仅返回ZBX\_HISTORY\_PERIOD中配置的时间段的值。|
|lastvalue|string|*(readonly)* Last value of the item. item的最后一个值。<br><br>This property will only return a value for the period configured in [ZBX\_HISTORY\_PERIOD](/manual/web_interface/definitions). 此属性将仅返回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.受监控日志文件上次更新的时间。 仅用于日志项。|
|multiplier|integer|Whether to use a custom multiplier.是否使用自定义乘数。|
|params|string|Additional parameters depending on the type of the item: 附加参数取决于item的类型：<br>- executed script for SSH and Telnet items;SSH和Telnet items执行脚本;<br>- SQL query for database monitor items; SQL查询数据库监视项<br>- formula for calculated items.计算项公式|
|password|string|Password for authentication. Used by simple check, SSH, Telnet, database monitor and JMX items.认证密码。 用于简单检查，SSH，Telnet，数据库监控和JMX项|
|port|string|Port monitored by the item. Used only by SNMP items.由项监视的端口。 仅由SNMP项使用。|
|prevvalue|string|*(readonly)* Previous value of the item. item的上一个值。<br><br>This property will only return a value for the period configured in [ZBX\_HISTORY\_PERIOD](/manual/web_interface/definitions).此属性将仅返回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社区。 仅由SNMPv1和SNMPv2项使用。|
|snmp\_oid|string|SNMP OID.|
|snmpv3\_authpassphrase|string|SNMPv3 auth passphrase. Used only by SNMPv3 items. 仅用于SNMPv3项。|
|snmpv3\_authprotocol|integer|SNMPv3 authentication protocol. Used only by SNMPv3 items. SNMPv3认证协议 仅用于SNMPv3项。<br><br>Possible values:可能的值<br>0 - *(default)* MD5;<br>1 - SHA.|
|snmpv3\_contextname|string|SNMPv3 context name. Used only by SNMPv3 items. SNMPv3上下文名称。 仅用于SNMPv3项|
|snmpv3\_privpassphrase|string|SNMPv3 priv passphrase. Used only by SNMPv3 items. SNMPv3 priv密码。 仅用于SNMPv3项|
|snmpv3\_privprotocol|integer|SNMPv3 privacy protocol. Used only by SNMPv3 items. SNMPv3隐私协议。 仅用于SNMPv3项<br><br>Possible values:可能的值：<br>0 - *(default)* DES;<br>1 - AES.|
|snmpv3\_securitylevel|integer|SNMPv3 security level. Used only by SNMPv3 items.SNMPv3安全级别。 仅用于SNMPv3项<br><br>Possible values:可能的值：<br>0 - noAuthNoPriv;<br>1 - authNoPriv;<br>2 - authPriv.|
|snmpv3\_securityname|string|SNMPv3 security name. Used only by SNMPv3 items. SNMPv3安全名称。 仅用于SNMPv3项|
|state|integer|*(readonly)* State of the item. item状态。<br><br>Possible values: 可能的值：<br>0 - *(default)* normal;<br>1 - not supported.|
|status|integer|Status of the item. item状态<br><br>Possible values: 可能的值：<br>0 - *(default)* enabled item;<br>1 - disabled item.|
|templateid|string|(readonly) ID of the parent template item. 父模板项的ID。|
|trapper\_hosts|string|Allowed hosts. Used only by trapper items.允许的主机。 仅由trapper items使用。|
|trends|string|A time unit of how long the trends data should be stored. Also accepts user macro.趋势数据应存储多长时间的单位。 也接受用户宏。<br><br>Default: 365d.|
|units|string|Value units.|
|username|string|Username for authentication. Used by simple check, SSH, Telnet, database monitor and JMX items. 验证用户名。 用于简单检查，SSH，Telnet，数据库监控和JMX项<br><br>Required by SSH and Telnet items.需要SSH和Telnet项目。|
|valuemapid|string|ID of the associated value map.相关值图的ID。|
