> Host prototype object

The following objects are directly related to the hostprototype API.

Host prototype

The host prototype object has the following properties.

PropertyTypeDescription
hostidstring(readonly) ID of the host prototype.
host
(required)
stringTechnical name of the host prototype.
namestringVisible name of the host prototype.

Default: host property value.
statusintegerStatus of the host prototype.

Possible values are:
0 - (default) monitored host;
1 - unmonitored host.
inventory_modeintegerHost inventory population mode.

Possible values are:
-1 - (default) disabled;
0 - manual;
1 - automatic.
templateidstring(readonly) ID of the parent template host prototype.
discoverintegerHost prototype discovery status.

Possible values:
0 - (default) new hosts will be discovered;
1 - new hosts will not be discovered and existing hosts will be marked as lost.
custom_interfacesintegerSource of interfaces for hosts created by the host prototype.

Possible values:
0 - (default) inherit interfaces from parent host;
1 - use host prototypes custom interfaces.

Group link

The group link object links a host prototype with a host group and has the following properties.

PropertyTypeDescription
group_prototypeidstring(readonly) ID of the group link.
groupid
(required)
stringID of the host group.
hostidstring(readonly) ID of the host prototype
templateidstring(readonly) ID of the parent template group link.

Group prototype

The group prototype object defines a group that will be created for a discovered host and has the following properties.

PropertyTypeDescription
group_prototypeidstring(readonly) ID of the group prototype.
name
(required)
stringName of the group prototype.
hostidstring(readonly) ID of the host prototype
templateidstring(readonly) ID of the parent template group prototype.

Host prototype tag

The host prototype tag object has the following properties.

PropertyTypeDescription
tag
(required)
stringHost prototype tag name.
valuestringHost prototype tag value.

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 - SHA.
privprotocolintegerSNMPv3 privacy protocol. Used only by SNMPv3 interfaces.

Possible values are:
0 - (default) - DES;
1 - AES.
contextnamestringSNMPv3 context name. Used only by SNMPv3 interfaces.