Hello,
I'm having difficulties getting just the physical/active network adapters in Zabbix. Normally you use net.if.discovery. Using filters you can get rid of the virutal adapters etc.
But this doesn't work for me. When I filter out all of the virtual and Microsoft network adapters the result is as following:

As you can see I have 5 entries from the same networkadapter. The only correct adapter is #5. The other four are not visible in the system. Because of driver updates the number has come to 5 adapters.
I tried using wmi to filter out the wrong adapters:
wmi.get[root\cimv2,Select ProductName From Win32_NetworkAdapter Where PhysicalAdapter = 1 And NetEnabled = 1
This gives me the same result as the printscreen.
wmi.get[root\cimv2,Select ProductName From Win32_NetworkAdapter Where PhysicalAdapter = 1 And NetEnabled = 1 And StatusInfo = "3"
Doesnt work. With zabbix_get I get the following error: ZBX_NOTSUPPORTED: Cannot optain WMI informaition.
If I use net.if.list I get an list of all the adapters with a status. If I could filter on the status here (enabled) my problem would be solved, but this is not possible.
Can somebody point me in the right direction?
I'm having difficulties getting just the physical/active network adapters in Zabbix. Normally you use net.if.discovery. Using filters you can get rid of the virutal adapters etc.
But this doesn't work for me. When I filter out all of the virtual and Microsoft network adapters the result is as following:
As you can see I have 5 entries from the same networkadapter. The only correct adapter is #5. The other four are not visible in the system. Because of driver updates the number has come to 5 adapters.
I tried using wmi to filter out the wrong adapters:
wmi.get[root\cimv2,Select ProductName From Win32_NetworkAdapter Where PhysicalAdapter = 1 And NetEnabled = 1
This gives me the same result as the printscreen.
wmi.get[root\cimv2,Select ProductName From Win32_NetworkAdapter Where PhysicalAdapter = 1 And NetEnabled = 1 And StatusInfo = "3"
Doesnt work. With zabbix_get I get the following error: ZBX_NOTSUPPORTED: Cannot optain WMI informaition.
If I use net.if.list I get an list of all the adapters with a status. If I could filter on the status here (enabled) my problem would be solved, but this is not possible.
Can somebody point me in the right direction?