可以发现主机的Zabbix前端中配置的所有接口。
在 发现规则 中使用的监控项是
内部监控项。此监控项从Zabbix server 3.4开始支持。
此监控项反馈一个带有接口描述的JSON,包括:
例如:
{"data":[{"{#IF.CONN}":"192.168.3.1","{#IF.IP}":"192.168.3.1","{#IF.DNS}":"","{#IF.PORT}":"10050","{#IF.TYPE}":"AGENT","{#IF.DEFAULT}":1}]}
使用多个接口,它们在JSON中的记录按以下顺序排序:
支持在发现规则过滤器,以及监控项,触发器和图表原型中使用以下宏:
宏 | 述 |
---|---|
{#IF.CONN} | 接口IP地址或DNS主机名称 |
{#IF.IP} | 接口IP地址 |
{#IF.DNS} | 接口DNS主机名称 |
{#IF.PORT} | 接口端口号 |
{#IF.TYPE} | 接口类型 ("AGENT", "SNMP", "JMX", or "IPMI"). |
{#IF.DEFAULT} | 接口默认状态: 0 - 非默认接口 1 - 默认接口 |
{#IF.SNMP.BULK} | 接口的SNMP批量处理状态: 0 - 禁用 1 - 启用 仅当接口类型为“SNMP”时才反馈此宏。 |
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 is supported since Zabbix server 3.4.
This item returns a JSON with the description of interfaces, including:
For example:
{"data":[{"{#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”. |