Ad Widget

Collapse

net.if.discovery returned empty value for {#IFNAME}

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Engraf
    Member
    • Sep 2014
    • 41

    #1

    net.if.discovery returned empty value for {#IFNAME}

    Hello,

    net.if.discovery rule in one of the hosts on my zabbix server creates itemes with empty {#IFNAME}. I.e. keys looks like net.if.in[] or net.if.out[]. Then this rule report the problem, that "cannot create item... already exists" because it detects several such interfaces.

    Actually, I solved this problem by adding regular expression ^$ is FALSE. So, just wondering why this happens.

    Output of zabbix_get -s host -p 10050 -k net.if.discovery:
    Code:
    {"data":[{"{#IFNAME}":"CORP Main LAN-QoS Packet Scheduler-0000"},
    {"{#IFNAME}":"HP Network Team #1"},
    {"{#IFNAME}":"Microsoft Virtual Network Switch Adapter"},
    {"{#IFNAME}":"CORP Main LAN"},
    {"{#IFNAME}":"Microsoft Failover Cluster Virtual Adapter"},
    {"{#IFNAME}":"HP NC112i 1-port Ethernet Server Adapter"},
    {"{#IFNAME}":"Microsoft Failover Cluster Virtual Adapter-QoS Packet Scheduler-0000"},
    {"{#IFNAME}":"HP NC112i 1-port Ethernet Server Adapter #2"},
    {"{#IFNAME}":"Software Loopback Interface 1"},
    {"{#IFNAME}":""},
    {"{#IFNAME}":""},
    {"{#IFNAME}":""},
    {"{#IFNAME}":""},
    {"{#IFNAME}":""},
    {"{#IFNAME}":""},
    {"{#IFNAME}":""},
    {"{#IFNAME}":""},
    {"{#IFNAME}":""},
    {"{#IFNAME}":""},
    {"{#IFNAME}":""},
    {"{#IFNAME}":""},
    {"{#IFNAME}":""},
    {"{#IFNAME}":""},
    {"{#IFNAME}":""},
    {"{#IFNAME}":""},
    {"{#IFNAME}":"Teredo Tunneling Pseudo-Interface"}]}
    Output of zabbix_get -s host -p 10050 -k "net.if.list"
    Code:
    Ethernet                  enabled  - CORP Main LAN-QoS Packet Scheduler-0000
    Ethernet                  enabled  - HP Network Team #1
    Ethernet                  enabled  - Microsoft Virtual Network Switch Adapter
    Ethernet                  enabled  192.168.1.7  CORP Main LAN
    Ethernet                  enabled  - Microsoft Failover Cluster Virtual Adapter
    Ethernet                  unknown  - HP NC112i 1-port Ethernet Server Adapter
    Ethernet                  enabled  - Microsoft Failover Cluster Virtual Adapter-QoS Packet Scheduler-0000
    Ethernet                  enabled  - HP NC112i 1-port Ethernet Server Adapter #2
    Software Loopback         enabled  127.0.0.1       Software Loopback Interface 1
    Tunnel type encapsulation unknown  -.
    Tunnel type encapsulation unknown  -.
    Tunnel type encapsulation unknown  -.
    Tunnel type encapsulation unknown  -.
    Tunnel type encapsulation unknown  -.
    Tunnel type encapsulation unknown  -.
    Tunnel type encapsulation unknown  -.
    Tunnel type encapsulation unknown  -.
    Tunnel type encapsulation unknown  -.
    Tunnel type encapsulation unknown  -.
    Tunnel type encapsulation unknown  -.
    Tunnel type encapsulation unknown  -.
    Tunnel type encapsulation unknown  -.
    Tunnel type encapsulation unknown  -.
    Tunnel type encapsulation unknown  -.
    Tunnel type encapsulation unknown  -.
    Tunnel type encapsulation enabled  - Teredo Tunneling Pseudo-Interface
    Last edited by Engraf; 09-06-2018, 12:38.
  • kernbug
    Senior Member
    • Feb 2013
    • 330

    #2
    Originally posted by Engraf
    Hello,

    net.if.discovery rule in one of the hosts on my zabbix server creates itemes with empty {#IFNAME}. I.e. keys looks like net.if.in[] or net.if.out[]. Then this rule report the problem, that "cannot create item... already exists" because it detects several such interfaces.

    Actually, I solved this problem by adding regular expression ^$ is FALSE. So, just wondering why this happens.
    Hello, Engraf

    Zabbix version (agent and server)?

    Please, execute from powershell both on working and not working windows hosts:
    Code:
    Get-NetAdapter -Name "*" -IncludeHidden

    Comment


    • Engraf
      Engraf commented
      Editing a comment
      It's in Windows 2008 Hyper-V, which does not support powershell 3.0 and Get-NetAdapter cmdlet.
      Zabix Server&Agent version is 3.4.8
  • kernbug
    Senior Member
    • Feb 2013
    • 330

    #3
    Could you list all the network adapters from cmd/console?

    Comment

    • Engraf
      Member
      • Sep 2014
      • 41

      #4
      Code:
      >netsh interface show interface
      
      Admin State    State          Type             Interface Name
      -------------------------------------------------------------------------
      Disabled       Disconnected   Dedicated        Local Area Connection
      Enabled        Connected      Dedicated        Local Area Connection 3
      Enabled        Disconnected   Dedicated        Local Area Connection 2
      Enabled        Connected      Dedicated        Local Area Connection 5
      Enabled        Connected      Dedicated        Local Area Connection 4
      Code:
      >ipconfig /all
      
      Windows IP Configuration
      
         Host Name . . . . . . . . . . . . : HV1
         Primary Dns Suffix  . . . . . . . : dname
         Node Type . . . . . . . . . . . . : Hybrid
         IP Routing Enabled. . . . . . . . : No
         WINS Proxy Enabled. . . . . . . . : No
         DNS Suffix Search List. . . . . . : dname
      
      Ethernet adapter Local Area Connection 5:
      
         Connection-specific DNS Suffix  . :
         Description . . . . . . . . . . . : CORP Main LAN
         Physical Address. . . . . . . . . : XX-XX-XX-XX-XX-XX
         DHCP Enabled. . . . . . . . . . . : No
         Autoconfiguration Enabled . . . . : Yes
         IPv4 Address. . . . . . . . . . . : 192.168.105.47(Preferred)
         Subnet Mask . . . . . . . . . . . : 255.255.252.0
         Default Gateway . . . . . . . . . : 192.168.105.100
         DNS Servers . . . . . . . . . . . : 192.168.105.7
                                             192.168.128.3
         NetBIOS over Tcpip. . . . . . . . : Enabled
      
      Ethernet adapter Local Area Connection* 18:
      
         Media State . . . . . . . . . . . : Media disconnected
         Connection-specific DNS Suffix  . :
         Description . . . . . . . . . . . : Microsoft Failover Cluster Virtual Adaptr
         Physical Address. . . . . . . . . : XX-XX-XX-XX-XX-XX
         DHCP Enabled. . . . . . . . . . . : Yes
         Autoconfiguration Enabled . . . . : Yes
      Code:
      >devcon listclass Net
      Listing 7 devices in setup class "Net" (Network adapters).
      PCI\VEN_8086&DEV_10D3&SUBSYS_1785103C&REV_00\4&2C536BEB&1&00E5: HP NC112i 1-port Ethernet Server Adapter
      PCI\VEN_8086&DEV_10D3&SUBSYS_1785103C&REV_00\4&739F580&1&00E4: HP NC112i 1-port Ethernet Server Adapter #2
      ROOT\*TEREDO\0000                                           : Teredo Tunneling Pseudo-Interface
      ROOT\CQ_CPQTEAMMP\0000                                      : HP Network Team #1
      ROOT\NETFT\0000                                             : Microsoft Failover Cluster Virtual Adapter
      ROOT\VMS_MP\0000                                            : Microsoft Virtual Network Switch Adapter
      ROOT\VMS_MP\0001                                            : CORP Main LAN

      Comment

      Working...