0 Replies Latest reply on Nov 9, 2019 11:37 AM by adharkrader

    CDP Neighbor query using UDT Ports instead of NPM Interfaces?

    adharkrader

      I am using the custom query (below) from Thwack thread 118607 to display CDP Neighbors.  The problem: the Local Interface is blank if that interface is not managed by NPM.  (We're not managing our campus access ports because they come and go frequently.)  We're considering adding UDT to monitor all ports... could this query be tweaked to use UDT.Ports instead of NPM.Interfaces?  It appears that UDT.Ports has very similar information.

       

      SELECT I.InterfaceName AS [Local Interface], CDP.IPAddress AS [IP Address], DeviceId AS Device, DevicePort AS [Remote Interface], (SELECT N2.DetailsURL from Orion.Nodes N2 JOIN Orion.NodeIPAddresses NIP ON (N2.NodeID = NIP.NodeID) WHERE NIP.IPAddress = CDP.IPAddress) AS [_LinkFor_Device]

      FROM Orion.NodeCdpEntry CDP

      JOIN Orion.Nodes N ON (N.NodeID = CDP.NodeID)

      LEFT OUTER JOIN Orion.NPM.Interfaces I ON ((CDP.NodeID = I.NodeID) AND (CDP.IfIndex = I.Index))

      WHERE (CDP.NodeID = ${NodeID}) AND (N.IPAddress <> CDP.IPAddress)

       

      Thanks - Al