14 Discovery of host interfaces in Zabbix
Overview
It is possible to discover all interfaces configured in Zabbix frontend for a host.
Item key
The item to use in the discovery rule is the
zabbix[host,discovery,interfaces]
internal item. This item is supported since Zabbix server 3.4.
This item returns a JSON with the description of interfaces, including:
- IP address/DNS hostname (depending on the “Connect to” host setting)
- Port number
- Interface type (Zabbix agent, SNMP, JMX, IPMI)
- If it is the default interface or not
- If the bulk request feature is enabled - for SNMP interfaces only.
For example:
[{"{#IF.CONN}":"192.168.3.1","{#IF.IP}":"192.168.3.1","{#IF.DNS}":"","{#IF.PORT}":"10050","{#IF.TYPE}":"AGENT","{#IF.DEFAULT}":1}]
With multiple interfaces their records in JSON are ordered by:
- Interface type,
- Default - the default interface is put before non-default interfaces,
- Interface ID (in ascending order).
Ondersteunde macros
De volgende macros worden ondersteund voor gebruik in de ontdekkingsregel filter en prototypen van items, triggers en grafieken:
| Macro | Beschrijving |
|---|---|
| {#IF.CONN} | IP-adres of DNS-hostnaam van de interface. |
| {#IF.IP} | IP-adres van de interface. |
| {#IF.DNS} | DNS-hostnaam van de interface. |
| {#IF.PORT} | Poortnummer van de interface. |
| {#IF.TYPE} | Type interface ("AGENT", "SNMP", "JMX" of "IPMI"). |
| {#IF.DEFAULT} | Standaardstatus voor de interface: 0 - geen standaardinterface 1 - standaardinterface |
| {#IF.SNMP.BULK} | Status van SNMP bulkverwerking voor de interface: 0 - uitgeschakeld 1 - ingeschakeld Deze macro wordt alleen geretourneerd als het interfacetype "SNMP" is. |