> Host prototype object

The following objects are directly related to the hostprototype API.

Host prototype

The host prototype object has the following properties.

Property Type Description
hostid string ID of the host prototype.

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

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

Default: host property value.

Property behavior:
- read-only for inherited objects
status integer Status of the host prototype.

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

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

Property behavior:
- read-only
discover integer Host 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_interfaces integer Source 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
uuid string Universal 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.

Property Type Description
groupid string ID 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.

Property Type Description
name string Name of the group prototype.

Property behavior:
- required

Host prototype tag

The host prototype tag object has the following properties.

Property Type Description
tag string Host prototype tag name.

Property behavior:
- required
value string Host 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.

Property Type Description
type integer Interface type.

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

Property behavior:
- required
useip integer Whether the connection should be made via IP.

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

Property behavior:
- required
ip string IP address used by the interface.
Can contain macros.

Property behavior:
- required if useip is set to "connect using host IP address"
dns string DNS name used by the interface.
Can contain macros.

Property behavior:
- required if useip is set to "connect using host DNS name"
port string Port number used by the interface.
Can contain user and LLD macros.

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

Property behavior:
- required
details array Additional object for interface.

Property behavior:
- required if type is set to "SNMP"

Custom interface details

The details object has the following properties.

Property Type Description
version integer SNMP interface version.

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

Property behavior:
- required
bulk integer Whether to use bulk SNMP requests.

Possible values:
0 - don't use bulk requests;
1 - (default) - use bulk requests.
community string SNMP community.

Property behavior:
- required if version is set to "SNMPv1" or "SNMPv2c"
max_repetitions integer Max repetition value for native SNMP bulk requests (GetBulkRequest-PDUs).
Used only for discovery[] and walk[] items in SNMPv2 and v3.

Default: 10.
securityname string SNMPv3 security name.

Property behavior:
- supported if version is set to "SNMPv3"
securitylevel integer SNMPv3 security level.

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

Property behavior:
- supported if version is set to "SNMPv3"
authpassphrase string SNMPv3 authentication passphrase.

Property behavior:
- supported if version is set to "SNMPv3" and securitylevel is set to "authNoPriv" or "authPriv"
privpassphrase string SNMPv3 privacy passphrase.

Property behavior:
- supported if version is set to "SNMPv3" and securitylevel is set to "authPriv"
authprotocol integer SNMPv3 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"
privprotocol integer SNMPv3 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"
contextname string SNMPv3 context name.

Property behavior:
- supported if version is set to "SNMPv3"