Zabbix Documentation 5.0

3.04.04.4 (current)| In development:5.0 (devel)| Unsupported:1.82.02.22.43.23.44.2Guidelines

User Tools

Site Tools


Sidebar

manual:api:reference:hostinterface:object

> 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.
Property Type Description
interfaceid string (readonly) ID of the interface.
dns
(required)
string DNS name used by the interface.

Can be empty if the connection is made via IP.
hostid
(required)
string ID of the host the interface belongs to.
ip
(required)
string IP address used by the interface.

Can be empty if the connection is made via DNS.
main
(required)
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 are:
0 - not default;
1 - default.
port
(required)
string Port number used by the interface. Can contain user macros.
type
(required)
integer Interface type.

Possible values are:
1 - agent;
2 - SNMP;
3 - IPMI;
4 - JMX.
useip
(required)
integer Whether 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 array Additional object for interface. Only used by SNMP interface.

Details tag

The details object has the following properties.

Property Type Description
version integer SNMP interface version.

Posibile values are:
1 - SNMPv1;
2 - (default) - SNMPv2c;
3 - SNMPv3
bulk integer Whether to use bulk SNMP requests.

Posibile values are:
0 - don't use bulk requests;
1 - (default) - use bulk requests.
community string SNMP community. Used only by SNMPv1 and SNMPv2 interfaces.
securityname string SNMPv3 security name. Used only by SNMPv3 interfaces.
securitylevel integer SNMPv3 security level. Used only by SNMPv3 interfaces.

Posibile values are:
0 - (default) - noAuthNoPriv;
1 - authNoPriv;
2 - authPriv.
authpassphrase string SNMPv3 authentication passphrase. Used only by SNMPv3 interfaces.
privpassphrase string SNMPv3 privacy passphrase. Used only by SNMPv3 interfaces.
authprotocol integer SNMPv3 authentication protocol. Used only by SNMPv3 interfaces.

Posibile values are:
0 - (default) - MD5;
1 - SHA.
privprotocol integer SNMPv3 privacy protocol. Used only by SNMPv3 interfaces.

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