It is possible to discover all interfaces configured in Zabbix frontend for a host.
The item to use in the discovery rule is the
internal item.
This item returns a JSON with the description of interfaces, including:
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:
The following macros are supported for use in the discovery rule filter and prototypes of items, triggers and graphs:
Macro | Description |
---|---|
{#IF.CONN} | Interface IP address or DNS host name. |
{#IF.IP} | Interface IP address. |
{#IF.DNS} | Interface DNS host name. |
{#IF.PORT} | Interface port number. |
{#IF.TYPE} | Interface type ("AGENT", "SNMP", "JMX", or "IPMI"). |
{#IF.DEFAULT} | Default status for the interface: 0 - not default interface 1 - default interface |
{#IF.SNMP.BULK} | SNMP bulk processing status for the interface: 0 - disabled 1 - enabled This macro is returned only if interface type is “SNMP”. |