以下对象与主机原型API直接相关.
主机原型对象具有以下属性:
| 属性 类 | 描述 | |
|---|---|---|
| hostid | 字符串 *( | 读)* 主机原型的ID. |
| host (必选) |
字符串 主机 | 型的技术名称. |
| name | 字符串 主机 | 型的可见名称. 默认: host 属性的值. |
| status | 整数 主 | 原型的状态. 可能的值: 0 - (默认) 被监控的主机; 1 - 不受监控的主机. |
| templateid | 字符串 *( | 读)* 父模板主机原型的ID. |
| tls_connect | 整数 到 | 机的连接. 可能的值: 1 - (默认) 无加密 ; 2 - PSK; 4 - 证书. |
| tls_accept | 整数 来 | 主机的连接. 可能的值: 1 - (默认) 无加密 ; 2 - PSK; 4 - 证书. |
| tls_issuer | 字符串 证书 | 行者. |
| tls_subject | 字符串 证书 | 体. |
| tls_psk_identity | 字符串 PS | 身份 如果tls_connect或tls_accept启用了PSK,则必需. |
| tls_psk | 字符串 预共 | 密钥,至少32位十六进制数字。 如果tls_connect或tls_accept启用了PSK,则必需. |
主机原型资产对象有以下属性:
| 属性 类 | 描述 | |
|---|---|---|
| inventory_mode | 整数 主 | 原型资产模式. 可能的值: -1 - 禁用; 0 - (默认) 手动; 1 - 自动. |
组链接对象将主机原型与主机组链接,并具有以下属性:
| 属性 类 | 描述 | |
|---|---|---|
| group_prototypeid | 字符串 *( | 读)* 组链接的ID. |
| groupid (必选) |
字符串 主机 | 的ID. |
| hostid | 字符串 *( | 读)* 主机原型的ID |
| templateid | 字符串 *( | 读)* 父模板组链接的ID. |
组原型对象定义将为已发现的主机创建的组,并具有以下属性:
| 属性 类 | 描述 | |
|---|---|---|
| group_prototypeid | 字符串 *( | 读)* 组原型的ID. |
| name (必选) |
字符串 组原 | 的名称. |
| hostid | 字符串 *( | 读)* 主机原型的ID |
| templateid | 字符串 *( | 读)* 父模板组原型的ID. |
The custom interface object has the following properties.
| Property | Type | Description |
|---|---|---|
| dns | string | DNS name used by the interface. Required if the connection is made via DNS. Can contain macros. |
| ip | string | IP address used by the interface. Required if the connection is made via IP. Can contain macros. |
| main (required) |
integer | Whether the interface is used as default on the host. Only one interface of some type can be set as default on a host. Possible values are: 0 - not default; 1 - default. |
| port (required) |
string | Port number used by the interface. Can contain user and LLD macros. |
| type (required) |
integer | Interface type. Possible values are: 1 - agent; 2 - SNMP; 3 - IPMI; 4 - JMX. |
| useip (required) |
integer | Whether the connection should be made via IP. Possible values are: 0 - connect using host DNS name; 1 - connect using host IP address for this host interface. |
| details | array | Additional object for interface. Required if interface 'type' is SNMP. |
The details object has the following properties.
| Property | Type | Description |
|---|---|---|
| version (required) |
integer | SNMP interface version. Possible values are: 1 - SNMPv1; 2 - SNMPv2c; 3 - SNMPv3 |
| bulk | integer | Whether to use bulk SNMP requests. Possible values are: 0 - don't use bulk requests; 1 - (default) - use bulk requests. |
| community | string | SNMP community. Used only by SNMPv1 and SNMPv2 interfaces. |
| securityname | string | SNMPv3 security name. Used only by SNMPv3 interfaces. |
| securitylevel | integer | SNMPv3 security level. Used only by SNMPv3 interfaces. Possible values are: 0 - (default) - noAuthNoPriv; 1 - authNoPriv; 2 - authPriv. |
| authpassphrase | string | SNMPv3 authentication passphrase. Used only by SNMPv3 interfaces. |
| privpassphrase | string | SNMPv3 privacy passphrase. Used only by SNMPv3 interfaces. |
| authprotocol | integer | SNMPv3 authentication protocol. Used only by SNMPv3 interfaces. Possible values are: 0 - (default) - MD5; 1 - SHA1; 2 - SHA224; 3 - SHA256; 4 - SHA384; 5 - SHA512. |
| privprotocol | integer | SNMPv3 privacy protocol. Used only by SNMPv3 interfaces. Possible values are: 0 - (default) - DES; 1 - AES128; 2 - AES192; 3 - AES256; 4 - AES192C; 5 - AES256C. |
| contextname | string | SNMPv3 context name. Used only by SNMPv3 interfaces. |