cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post
Level 7

MAC Address for Nodes

Jump to solution

Hello,

I am looking to get some data out of Orion what I basically need is a list of all nodes their ip address and mac address. I can get the list of Nodes and IP but having a hard time trying to get to the MAC.

I found a table NodeMACaddress but that has multiple macs for single nodeid and I assume that its the MAC of the interfaces/ports on the Nodes and not of the actual node.

Please advice.

Thank you

0 Kudos
1 Solution

SWQL:

Select N.Caption, N.IP_Address, N.Interfaces.PhysicalAddress

from orion.Nodes N

SQL:

SELECT N.Caption, N.Ip_Address, I.PhysicalAddress

  FROM [dbo].[Interfaces] I

  Join dbo.nodes N on I.NodeID=N.NodeID

View solution in original post

8 Replies
Level 13

Also, I just realized when you say mac address of a node ... do you mean it's serial number? Only MAC addresses I'm familiar with are on the NIC's.

^ this, nodes don't have MAC addresses, network interfaces do, as they are a part of the networking protocol.  Sometimes people treat a device as having only one MAC because in a simple sense a workstation often only has 1 network port built into it so it only has 1 MAC, but most servers have multiple nics, and at the server level you are often even going to have virtual/logical objects on top of those with additional MAC's.

- Marc Netterfield, Github

Exactly!! Took me reading this post twice to realize....NIC's have MAC addresses. Systems have Serial numbers. But either way asset inventory should be the best to get either of these data points. Wouldn't you say?

0 Kudos

Thank you guys for your insight !! ... I dont see a asset table in my database. I think I should rephrase my question. I am looking to get an inventory of all devices with their IP and Macs. (if they have one)

0 Kudos

SWQL:

Select N.Caption, N.IP_Address, N.Interfaces.PhysicalAddress

from orion.Nodes N

SQL:

SELECT N.Caption, N.Ip_Address, I.PhysicalAddress

  FROM [dbo].[Interfaces] I

  Join dbo.nodes N on I.NodeID=N.NodeID

View solution in original post

mesverrum​ correct me if I'm wrong but the table wouldn't be there unless asset inventory is actually checked on the devices being monitored correct?

0 Kudos

Yeah, asset inventory is optional, but the NodesMacAddress table is pretty reliable even when no inventory is being collected.

- Marc Netterfield, Github
0 Kudos
Level 13

I would think that this information might be the asset information tables (Maybe). I say this only because if you have your npm gathering asset details on your devices MAC addresses I believe maybe part of it. Not sure exactly what table that would be. Maybe someone else can elaborate a little further here, and help you find the table you need.

0 Kudos