[ZBXNEXT-1163] Filter Physical Interface with net.if.discovery Created: 2012 Mar 23  Updated: 2018 Nov 06  Resolved: 2012 Jun 13

Status: Closed
Project: ZABBIX FEATURE REQUESTS
Component/s: Agent (G)
Affects Version/s: 2.0.0
Fix Version/s: None

Type: Change Request Priority: Minor
Reporter: Philippe Gouaillier Assignee: Alexei Vladishev
Resolution: Won't fix Votes: 0
Labels: lld, windows
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Hi,
While I was exploring the new discovery feature of the latest 2.0rc2, I realize that a lot of network cards are returned by the net.if.discovery key on a Windows host. Even on a computer that have only one connected card. It would be nice if only the "Physical" card is returned. The equivalent of the following WMI query:

Select * From Win32_NetworkAdapter Where PhysicalAdapter = 1

There may be other interesting properties of the Win32_NetworkAdapter class like NetEnable. Maybe it would make sense then to implement a

{#IFTYPE}

macro to store those properties.

Keep up the good work!



 Comments   
Comment by Christopher Ferraro [ 2012 Jun 06 ]

There is a quick workaround to filter out a lot of the extra Windows network devices using regular expressions under Administration, General, Regular Expressions.
Add a regexp called Network-discovery with the following expression:

(Loopback|Miniport|Microsoft) Result is FALSE No

You then filter on your lld network discovery rule using

{#IFNAME}

and @Network-discovery
This has proven very useful for limiting Windows network device results in my environment.

Comment by Oleksii Zagorskyi [ 2012 Jun 13 ]

I think it can be closed. Usage of global regexp is clear and easy and ready solution.

Note that "PhysicalAdapter" option for the " Win32_NetworkAdapter" WMI class missing for Windows XP (at least).
Also forced filtering by "PhysicalAdapter" will filter out all virtual interfaces (openvpn etc) which could be desired to be monitored.

I'm closing this case, feel free to reopen if you do not agree.

Generated at Thu Mar 28 17:23:30 EET 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.