Quantcast
Channel: THWACK: Popular Discussions - Orion SDK
Viewing all articles
Browse latest Browse all 3719

Find port and switch for a given IPAddress

$
0
0

I'm attempting to get the port and switch for some IP Addresses that are connected and in use.  We have the Switch Port Mapping Tool - Switch Port Checker | SolarWinds  searching for an IP via the web interface, I can get the switch and port information, but when I attempt to get the same with SWQL, I haven't had any luck.  Can anyone provide some advice as to which tables this uses?

 

Raw non UDT based.

SELECT P.PortID      , P.IfIndex      , P.VlanId      , P.PortType     , p.Description     , N.IPAddress     , N.DisplayName
FROM Orion.NodePortInterfaceMap AS P
JOIN Orion.Nodes AS N ON N.NodeID = P.NodeId
WHERE N.IPAddress = '#.#.#.#' -- with a real IP Address

 

UDT based.

SELECT N.DisplayName     , N.IPAddress     , P.PortDescription     , P.PortIndex
FROM Orion.Nodes N
INNER JOIN Orion.UDT.Port AS P on P.NodeID=N.NodeID 
WHERE N.IPAddress = '#.#.#.#' -- with a real IP Address

 

Thanks in advance.


Viewing all articles
Browse latest Browse all 3719

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>