Search code examples
snmpzabbix

Hide unused network interfaces in Zabbix


I am interested in filtering out network interfaces that aren't connected to make things a bit simpler. I tried the filter

{#SNMPVALUE} : ^u|^1

on this page:https://www.zabbix.com/forum/showthread.php?t=37656

I added it to the filter on "Template OS Linux: Network interface discovery" but that just hides all network interfaces. I am not sure if there have been some updates in how I should filter that out in the newer versions of Zabbix.


Solution

  • The forum thread you found talks about discovering SNMP interfaces, while the template you mentioned is for Linux.

    For the agent interface discovery, {#SNMPVALUE} is not populated at all, thus your filter never matches.

    To filter out interfaces, you would have to figure out the criteria. The built-in interface discovery only returns the interface name, thus there is no way to filter interfaces by another criteria - unless you implement a custom LLD.

    Built-in support for filtering agent interfaces by state is requested in the comments of ZBXNEXT-2286.