7 Replies Latest reply on Feb 3, 2020 3:46 AM by Arne Kaj Winther

    How to get NetworkInterface with IPv4Address exported

    Arne Kaj Winther
      Share This:

      I try to export NetworkInterface and the IP adresses they are configured with, but the exporter stop with an error:

      • main     
      • 2020-01-23   16:17:56,721            
      • com.tideway.integrations.cmdbexport.CmdbExporter
      • ERROR The mapping exited with an error
        com.tideway.integrations.cmdbexport.transform.TransformException: A problem
        occurred while transforming: Collection CI's fields have differing numbers of
        values. Expected 1 values, but field Host Name IPv4 has 4.

       

       

      I made this smal Query there list NetworkInterface and the IPv4 there belong:

      search NetworkInterface show #InterfaceWithAddress:InterfaceAddress:IPv4Address:IPAddress.ip_addr as 'IP Address', interface_name as 'Interface Name'

       

      And here i got the same:

      IP Address

      Interface Name

      10.190.111.14, 10.190.111.11

      xnf0

      10.190.111.168, 10.190.111.173,  10.190.111.172

      PROD

      10.190.111.177, 10.190.111.174,  10.190.111.164, 10.190.111.165

      TEAM_PRODUCTION

      10.190.112.17, 10.190.112.18,  10.190.112.27

      xnf0

       

      Is ther a way I can get the Query to print one line for each IP:

      IP Address

      Interface Name

      1. 10.190.111.14

      xnf0

      1. 10.190.111.11

      xnf0

      1. 10.190.111.168

      PROD

      1. 10.190.111.173

      PROD

      1. 10.190.111.172

      PROD

      1. 10.190.111.177

      TEAM_PRODUCTION

      1. 10.190.111.174

      TEAM_PRODUCTION

      1. 10.190.111.164

      TEAM_PRODUCTION

      1. 10.190.111.165

      TEAM_PRODUCTION

      1. 10.190.112.17

      xnf0

      1. 10.190.112.18

      xnf0

      1. 10.190.112.27

      xnf0

       

      Thanks in advance,

      Arne