Discovery MAC Address

Steven Parker
Giga Sage

This should be simple so I hope it is.

Looking at a computer we discovered in our CMDB.   MAC Address is showing in the Related Links section under Network Adapters:

find_real_file.png

But is not showing in the field at the top of the form for that computer in the CMDB.   How can we make it show here?

find_real_file.png


Please mark this response as correct and/or helpful if it assisted you with your question.
Steven
7 REPLIES 7

JBark
Tera Expert

VivekSattanatha
Mega Sage
Mega Sage

Hi Steven,



Many people are asking this question. OOB ServiceNow updates Mac address in Network adapter table. Some device will have multiple network adapters so you will get more than one mac address. To avoid this confusion ServiceNow updates in Network adapter table.



I have written a custom probe and Sensor, in case if you want to update directly the Server table.



Probe: You can write WMI probe to update Mac address. Below is the Wmi path of mac address



Win32_NetworkAdapterConfiguration.MACAddress



Sensor: Below is the sensor code to parse the MAC address



new DiscoverySensor({


      dataArray: [],



      process: function(result) {


              this.parseResult(result);


      },



      parseResult: function(result) {


              var dataArrayList = g_array_util.ensureArray(result.Win32_NetworkAdapterConfiguration);



              for (var i = 0; i < dataArrayList.length; i++) {


                      var element = dataArrayList[i];


                      var dataArrayDef = {};



                      dataArrayDef.mac_address                         = element.MACAddress;


                      var mac_add = dataArrayDef.mac_address;


                      var param = /^([0-9A-Fa-f]{2}[:]){5}([0-9A-Fa-f]{2})$/;


                      if(JSUtil.notNil(mac_add) && mac_add.match(param))


                      current.mac_address = dataArrayDef.mac_address;



              }



      },



      type: "DiscoverySensor"


});



Hope this helps for you.



Regards,


Vivek



Based on the impact hit like, helpful or correct.


Hi Vivek,

 

After doing switch discovery the network adapter list shows the same mac address for all the interfaces. Is it right?

Hi Vivek

can you please let me know how i can use the simillar script for a linux mid server, As im also facing issue where After doing switch discovery the network adapter list shows the same mac address for all the interfaces.