> 主机原型对象

以下对象与主机原型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_connecttls_accept启用了PSK,则必需.
tls_psk字符串 预共密钥,至少32位十六进制数字。 如果tls_connecttls_accept启用了PSK,则必需.

主机原型资产

主机原型资产对象有以下属性:

属性 类描述
inventory_mode整数 主原型资产模式.

可能的值:
-1 - 禁用;
0 - (默认) 手动;
1 - 自动.

组链接

组链接对象将主机原型与主机组链接,并具有以下属性:

属性 类描述
group_prototypeid字符串 (读) 组链接的ID.
groupid
(必选)
字符串 主机的ID.
hostid字符串 (读) 主机原型的ID
templateid字符串 (读) 父模板组链接的ID.

组原型

组原型对象定义将为已发现的主机创建的组,并具有以下属性:

属性 类描述
group_prototypeid字符串 (读) 组原型的ID.
name
(必选)
字符串 组原的名称.
hostid字符串 (读) 主机原型的ID
templateid字符串 (读) 父模板组原型的ID.

Custom interface

The custom interface object has the following properties.

PropertyTypeDescription
dnsstringDNS name used by the interface.

Required if the connection is made via DNS. Can contain macros.
ipstringIP address used by the interface.

Required if the connection is made via IP. Can contain macros.
main
(required)
integerWhether 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)
stringPort number used by the interface. Can contain user and LLD macros.
type
(required)
integerInterface type.

Possible values are:
1 - agent;
2 - SNMP;
3 - IPMI;
4 - JMX.
useip
(required)
integerWhether 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.
detailsarrayAdditional object for interface. Required if interface ‘type’ is SNMP.

Custom interface details

The details object has the following properties.

PropertyTypeDescription
version
(required)
integerSNMP interface version.

Possible values are:
1 - SNMPv1;
2 - SNMPv2c;
3 - SNMPv3
bulkintegerWhether to use bulk SNMP requests.

Possible values are:
0 - don’t use bulk requests;
1 - (default) - use bulk requests.
communitystringSNMP community. Used only by SNMPv1 and SNMPv2 interfaces.
securitynamestringSNMPv3 security name. Used only by SNMPv3 interfaces.
securitylevelintegerSNMPv3 security level. Used only by SNMPv3 interfaces.

Possible values are:
0 - (default) - noAuthNoPriv;
1 - authNoPriv;
2 - authPriv.
authpassphrasestringSNMPv3 authentication passphrase. Used only by SNMPv3 interfaces.
privpassphrasestringSNMPv3 privacy passphrase. Used only by SNMPv3 interfaces.
authprotocolintegerSNMPv3 authentication protocol. Used only by SNMPv3 interfaces.

Possible values are:
0 - (default) - MD5;
1 - SHA1;
2 - SHA224;
3 - SHA256;
4 - SHA384;
5 - SHA512.
privprotocolintegerSNMPv3 privacy protocol. Used only by SNMPv3 interfaces.

Possible values are:
0 - (default) - DES;
1 - AES128;
2 - AES192;
3 - AES256;
4 - AES192C;
5 - AES256C.
contextnamestringSNMPv3 context name. Used only by SNMPv3 interfaces.