> Host interface object

The following objects are directly related to the hostinterface API.

Host interface

The host interface object has the following properties.

Note that both IP and DNS are required. If you do not want to use DNS, set it to an empty string.

PropertyTypeDescription
availableinteger(readonly) Availability of host interface.

Possible values are:
0 - (default) unknown;
1 - available;
2 - unavailable.
detailsarrayAdditional object for interface. Required if interface ‘type’ is SNMP.
disable_untiltimestamp(readonly) The next polling time of an unavailable host interface.
dns
(required)
stringDNS name used by the interface.

Can be empty if the connection is made via IP.
errorstring(readonly) Error text if host interface is unavailable.
errors_fromtimestamp(readonly) Time when host interface became unavailable.
hostid
(required)
stringID of the host the interface belongs to.
interfaceidstring(readonly) ID of the interface.
ip
(required)
stringIP address used by the interface.

Can be empty if the connection is made via DNS.
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 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.

Details tag

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 (required). 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.