This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

CDP Neighbors Table

Would like to share this for those who want to have the CDP Neighbors of your switches without monitoring all ports of the switches.

First I would like to thank blsanner that help me with the SWQL query and cnorborg that wrote this document https://thwack.solarwinds.com/docs/DOC-186601 and put me on the track for this one.

You need to create an UdNP to get the local interface name and assign it to the device you want CDP Neighbor to show up.

pastedImage_0.png

Then in the Orion Web interface choose where you want your table to show up then click customize page view and add a “Custom Query” to your view, then edit the custom query Name It CDP Neighbors and paste this SWQL query:

SELECT cps.Status AS [Local Interface], cdp.IPAddress AS [IP Address], cdp.DeviceId AS Device, cdp.DevicePort AS [Remote Interface] FROM  Orion.NodeCdpEntry cdp INNER JOIN Orion.NPM.CustomPollerStatusOnNodeTabular cps ON cdp.NodeID = cps.NodeID WHERE cdp.IfIndex LIKE cps.RowID AND cdp.NodeID = ${NodeID}

It worked OK on all my switches and this is what it look like.

pastedImage_1.png

Hope this will help!!!

  • There is even yet another way of doing this that might be simpler, depending on your environment.   There is both a CDP neighbors table in NPM, which is what the link you gave leverages, and another CDP neighbors table in NCM, which of course means you have to be running NCM!   Quite a bit of differences between the two though, with the main difference being that NCM gets the information by doing an "Inventory", which doesn't depend on you managing the interface.

    That being said, this inventory is done on a schedule, so depending on how often this inventory is done depends on how valid the information is.   Odds are it would be quite a bit lower impact than a UnDP, although I'd also doubt it would be updated as much.   So, which approach you take depends on how your environment is set up and how often you want these CDP neighbors to be scanned.  In our environment, ideally I'd like all interfaces with CDP neighbors to be monitored, so my original approach works ok, but if you have a limited # of interfaces you can monitor or something this might not work with your environment.

    But, if you do have NCM and you're ok with the information being updated when you do inventory updates, then this works quite well without a UnDP!

    SELECT CDP.Interfaces.InterfaceName AS [Local Interface], RemoteIPAddress AS [IP Address], RemoteDevice AS Device, RemotePort AS [Remote Interface], N.DetailsURL AS [_LinkFor_Device]

    FROM NCM.CiscoCdp CDP

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

    WHERE N.NodeID = ${NodeID}

    Sorry I didn't post it earlier!!

    So, the way I see it, there are 3 choices now!

    NPM Based CDP - Pro's that it doesn't need any other modules or UnDP, cons that you have to manage an interface to see it in the CDP table.

    UnDP Based CDP - Pro's are that you don't need NCM, gets the interface regardless of whether its managed, but requires a bit more setup plus you have to assign the UnDP to the device.  But, you can manage the schedule that it polls very well too.

    NCM based CDP (ie: this message).  Cons are that you need NCM, only updates when you do an inventory update, but gets all involved interfaces regardless of managed state.  You do have to have NCM assigned to the device also.

    Nice job on the UnDP though mmarchand, even if someone decides to use a different method its a good example!   Also always cool to show different ways of accomplishing things, shows how flexible Solarwinds truly is!!

  • Hi Craig

    Thanks for the comments, unfortunately no NCM for me and more then 4000 switch port to monitor, $$$ only for CDP, Had to find a way to do it.

    Actually I will change the polling interval of the UnDP it is at 30 minutes now, but since it is only use for the name associated to the ifIndex of the port this never changes so it will not take much resources on the polling engine, everything else comes from NPM cdp Neighbors native poller.