Sidebar

zh:manual:api:reference:itemprototype:object

> Item prototype object

The following objects are directly related to the itemprototype API. 如下对象与itemprototype API直接相关。

Item prototype 监控项原型

The item prototype object has the following properties. 监控项原型有如下属性。

Property Type Description
itemid string (readonly) ID of the item prototype. 监控项原型的ID。
delay
(required)
string Update interval of the item prototype. 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 and LLD macros. Flexible intervals could be written as two macros separated by a forward slash. Intervals are separated by a semicolon.监控项原型的更新时间间隔。接受具有后缀的秒或时间单位,并且具有或不具有由灵活间隔和调度间隔组成的一个或多个自定义间隔作为串行化字符串。还接受用户宏和LLD宏。 灵活的间隔可以写成两个由正斜杠分隔的宏。 间隔用分号分隔。 custom intervals
hostid
(required)
string ID of the host that the item prototype belongs to. 监控项原型所属的主机的ID。

For update operations this field is readonly.
ruleid
(required)
string ID of the LLD rule that the item belongs to. 监控项所属的LLD(低级别发现)的ID

For update operations this field is readonly.
interfaceid
(required)
string ID of the item prototype's host interface. Used only for host item prototypes. 监控项原型的主机的接口的ID。仅用于主机监控项原型。

Optional for Zabbix agent (active), Zabbix internal, Zabbix trapper, Dependent item, Zabbix aggregate, 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;
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;
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;
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}. 仅在HTTP agent监控项原型有要求的URL字符串。支持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. HTTP agent监控项原型字段。允许像trapper监控项一样的填充值。

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 监控项原型或者 HTTP agent 监控项原型。

SSH agent authentication method possible values: SSH agent认证方法可能的值:
0 - (default) password;
1 - public key.

HTTP agent authentication method possible values:
0 - (default) none
1 - basic
2 - NTLM
description string Description of the item prototype. 监控项原型的说明。
follow_redirects integer HTTP agent item prototype field. Follow respose redirects while pooling data. HTTP agent监控项原型字段。当合并数据时跟随重定向。

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. HTTP agent监控项原型字段。 带有HTTP(S)的报头,名称是键,报文的值是键的值。

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. 历史数据应被保存的时间。接受用户宏和LLD宏。

Default: 90d.
http_proxy string HTTP agent item prototype field. HTTP(S) proxy connection string. HTTP agent监控项原型字段。HTTP(S)代理连接字符串。
ipmi_sensor string IPMI sensor. Used only by IPMI item prototypes. IPMI传感器,仅用于IPMI监控项原型。
jmx_endpoint string JMX agent custom connection string. JMX agent自定义的连接字符串。

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. 主监控项ID。
Recursion up to 3 dependent items and item prototypes and maximum count of dependent items and item prototypes equal to 999 are allowed.

Required by Dependent items.
output_format integer HTTP agent item prototype field. Should response converted to JSON. HTTP agent监控项原型字段。返回数据应被转换为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.
password string Password for authentication. Used by simple check, SSH, Telnet, database monitor, JMX and HTTP agent item prototypes. 认证的密码。用于simple check, SSH, Telnet, database monitor, JMX and HTTP agent 监控项原型。
port string Port monitored by the item prototype. Used only by SNMP items prototype. 监控的监控项原型的端口。仅用于SNMP监控项原型。
post_type integer HTTP agent item prototype field. Type of post data body stored in posts property. HTTP agent监控项原型字段。存储在post属性的post数据体的类型。

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. HTTP agent监控项原型字段。HTTP(S) 请求报文数据。用于post_data。
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. HTTP agent监控项原型字段。查询参数。带有键值对的数组对象,值可以为空字符串。
request_method integer HTTP agent item prototype field. Type of request method. HTTP agent监控项原型字段。请求方法类型。

0 - GET
1 - (default) POST
2 - PUT
3 - HEAD
retrieve_mode integer HTTP agent item prototype field. What part of response should be stored. HTTP agent监控项原型字段。指定那一部分的响应应该被存储。

0 - (default) Body.
1 - Headers.
2 - Both body and headers will be stored.

For request_method HEAD only 1 is allowed value.
snmp_community string SNMP community.

Used only by SNMPv1 and SNMPv2 item prototypes. 仅用于SNMPv1和SNMPv2监控项原型。
snmp_oid string SNMP OID.
snmpv3_authpassphrase string SNMPv3 auth passphrase. Used only by SNMPv3 item prototypes. SNMPv3认证密码。仅用于SNMPv3监控项原型。
snmpv3_authprotocol integer SNMPv3 authentication protocol. Used only by SNMPv3 items. SNMPv3认证协议。仅用于SNMPv3监控项原型。

Possible values:
0 - (default) MD5;
1 - SHA.
snmpv3_contextname string SNMPv3 context name. Used only by SNMPv3 item prototypes. SNMPv3文本名称。仅用于SNMPv3监控项原型。
snmpv3_privpassphrase string SNMPv3 priv passphrase. Used only by SNMPv3 item prototypes. SNMPv3私有密码。仅用于SNMPv3监控项原型。
snmpv3_privprotocol integer SNMPv3 privacy protocol. Used only by SNMPv3 items. SNMPv3私有协议。仅用于SNMPv3监控项原型。

Possible values:
0 - (default) DES;
1 - AES.
snmpv3_securitylevel integer SNMPv3 security level. Used only by SNMPv3 item prototypes. SNMPv3安全等级。仅用于SNMPv3监控项原型。

Possible values:
0 - noAuthNoPriv;
1 - authNoPriv;
2 - authPriv.
snmpv3_securityname string SNMPv3 security name. Used only by SNMPv3 item prototypes. SNMPv3认安全名称。仅用于SNMPv3监控项原型。
ssl_cert_file string HTTP agent item prototype field. Public SSL Key file path. HTTP agent监控项原型字段。公共SSL key文件路径。
ssl_key_file string HTTP agent item prototype field. Private SSL Key file path. HTTP agent监控项原型字段。私有SSL key文件路径。
ssl_key_password string HTTP agent item prototype field. Password for SSL Key file. HTTP agent监控项原型字段。SSL key文件的密码。
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. HTTP agent监控项原型字段。以逗号分隔的要求的HTTP状态码的范围。也接受用户宏和LLD宏。

Example: 200,200-{$M},{$M},200-400
templateid string (readonly) ID of the parent template item prototype. (只读)父模板的监控项原型的ID。
timeout string HTTP agent item prototype field. Item data polling request timeout. Support user macros and LLD macros. HTTP agent监控项原型字段。监控项数据合并请求超时时间。支持用户宏和LLD宏。

default: 3s
maximum value: 60s
trapper_hosts string Allowed hosts. Used by trapper item prototypes or HTTP item prototypes.允许主机。用于trapp监控项原型或者HTTP监控项原型。
trends string A time unit of how long the trends data should be stored. Also accepts user macro and LLD macro. 趋势数据被保存的时间。也接受用户宏和LLD宏。

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. 认证的用户名。用于simple check, SSH, Telnet, database monitor, JMX and HTTP agent 监控项原型。

Required by SSH and Telnet item prototypes. SSH 和 Telnet 监控项原型要求。
valuemapid string ID of the associated value map. 相关值映射的ID。
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. HTTP agent监控项原型字段。验证URL中的主机名在主机证书中的通用名字段或者备用字段。

0 - (default) Do not validate.
1 - Validate.
verify_peer integer HTTP agent item prototype field. Validate is host certificate authentic. HTTP agent监控项原型字段。主机合法性认证。

0 - (default) Do not validate.
1 - Validate.