> Host prototype object

The following objects are directly related to the hostprototype API.

Host prototype

The host prototype object has the following properties.

PropertyTypeDescription
hostidstringID of the host prototype.

Property behavior:
- read-only
- required for update operations
hoststringTechnical name of the host prototype.

Property behavior:
- required for create operations
- read-only for inherited objects
namestringVisible name of the host prototype.

Default: host property value.

Property behavior:
- read-only for inherited objects
statusintegerStatus of the host prototype.

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

Possible values:
-1 - (default) disabled;
0 - manual;
1 - automatic.
templateidstringID of the parent template host prototype.

Property behavior:
- read-only
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 custom interfaces for hosts created by the host prototype.

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

Property behavior:
- read-only for inherited objects
uuidstringUniversal unique identifier, used for linking imported host prototypes to already existing ones. Auto-generated, if not given.

Property behavior:
- supported if the host prototype belongs to a template

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

PropertyTypeDescription
groupidstringID of the host group.

Property behavior:
- required

Group prototype

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

PropertyTypeDescription
namestringName of the group prototype.

Property behavior:
- required

Host prototype tag

The host prototype tag object has the following properties.

PropertyTypeDescription
tagstringHost prototype tag name.

Property behavior:
- required
valuestringHost prototype tag value.

Custom interface

Custom interfaces are supported if custom_interfaces of Host prototype object is set to “use host prototypes custom interfaces”. The custom interface object has the following properties.

PropertyTypeDescription
typeintegerInterface type.

Possible values:
1 - Agent;
2 - SNMP;
3 - IPMI;
4 - JMX.

Property behavior:
- required
useipintegerWhether the connection should be made via IP.

Possible values:
0 - connect using host DNS name;
1 - connect using host IP address.

Property behavior:
- required
ipstringIP address used by the interface.
Can contain macros.

Property behavior:
- required if useip is set to “connect using host IP address”
dnsstringDNS name used by the interface.
Can contain macros.

Property behavior:
- required if useip is set to “connect using host DNS name”
portstringPort number used by the interface.
Can contain user and LLD macros.

Property behavior:
- required
mainintegerWhether 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:
0 - not default;
1 - default.

Property behavior:
- required
detailsarrayAdditional object for interface.

Property behavior:
- required if type is set to “SNMP”

Custom interface details

The details object has the following properties.

PropertyTypeDescription
versionintegerSNMP interface version.

Possible values:
1 - SNMPv1;
2 - SNMPv2c;
3 - SNMPv3.

Property behavior:
- required
bulkintegerWhether to use bulk SNMP requests.

Possible values:
0 - don’t use bulk requests;
1 - (default) - use bulk requests.
communitystringSNMP community.

Property behavior:
- required if version is set to “SNMPv1” or “SNMPv2c”
securitynamestringSNMPv3 security name.

Property behavior:
- supported if version is set to “SNMPv3”
securitylevelintegerSNMPv3 security level.

Possible values:
0 - (default) - noAuthNoPriv;
1 - authNoPriv;
2 - authPriv.

Property behavior:
- supported if version is set to “SNMPv3”
authpassphrasestringSNMPv3 authentication passphrase.

Property behavior:
- supported if version is set to “SNMPv3” and securitylevel is set to “authNoPriv” or “authPriv”
privpassphrasestringSNMPv3 privacy passphrase.

Property behavior:
- supported if version is set to “SNMPv3” and securitylevel is set to “authPriv”
authprotocolintegerSNMPv3 authentication protocol.

Possible values:
0 - (default) - MD5;
1 - SHA1;
2 - SHA224;
3 - SHA256;
4 - SHA384;
5 - SHA512.

Property behavior:
- supported if version is set to “SNMPv3” and securitylevel is set to “authNoPriv” or “authPriv”
privprotocolintegerSNMPv3 privacy protocol. Used only by SNMPv3 interfaces.

Possible values:
0 - (default) - DES;
1 - AES128;
2 - AES192;
3 - AES256;
4 - AES192C;
5 - AES256C.

Property behavior:
- supported if version is set to “SNMPv3” and securitylevel is set to “authPriv”
contextnamestringSNMPv3 context name.

Property behavior:
- supported if version is set to “SNMPv3”