Historical MAC Addresses

primalcurve
New Contributor III

Hi All,

I made the following Extension Attribute to collect MAC addresses of devices now that we are living in Dongle Hell. This reports the last MAC address of both built-in and removable devices connected to the machines. To prevent the table from becoming massive, it overwrites the previous entry of any type of adapter. So if a client has 7 Thunderbolt Ethernet adapters, it will only show the last one used.

The table is designed to be human-readable by techs to better facilitate troubleshooting of network issues. I'd be curious to find out if folks found it as useful as we have. I have attached an example of its output.

https://github.com/primalcurve/macsupportpub/blob/master/extension_attributes/LastReportedMACAddress...

151d1773f43f4b289eaa847e5eab9945

2 REPLIES 2

monogrant
Contributor

Is there a reason you're writing to disk before posting the result?

Nevermind...the 'null' value of disconnected. Missed that you were reading the file. Duh!

primalcurve
New Contributor III

Yeah. I want that old data. I don't want it overwritten just because the client is on a different interface. I will probably eventually set it up so that it only keeps the last X months, but for now it's manageable.