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.

Want to see your cisco CDP?

blah

  • It's a fun project to build and run a CDP Neighbor report and get the output into Excel format.  I just ran one earlier this week for a Manager, to show how many CDP relationships there are.  The number was 3744, and it was a user-friendly and tightly efficient page that showed every device and its relationships to all other CDP neighbors.

    pastedImage_0.png

    Write me if you're interested in the Python scripting to generate the full network's list of all CDP neighbors/interfaces/relationships and I'll post it.

    Add CDP Neighbor as a Widget into all your NPM Node Views:

    Just add this Custom SWQL into a resource added onto your NPM page:

    First:  Edit a Node's NPM page.

    Next:  Add a new "Custom Query" Widget in the NPM page's view wherever you want.  Right column, left column, higher up or lower down.

    Finally:  Edit the Custom Query:  Name it "CDP Neighbors".   Paste the script below into the Query.  Submit it.

    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)

    The process above works at 12.4 and later.

    The process below worked pre-12.4.

    pastedImage_0.png

    The output looks like this (on a Distribution switch with several hundred CDP neighbors):

    pastedImage_1.png

    A single, smaller Access Switch, with only fifteen AP's on it, and a couple of uplinks or downlinks, is a simpler view:

    pastedImage_2.png

    Rick Schroeder

  • Hi, rschroeder

    This doesnt seem to work anymore after upgrading to Orion 2019.2 HF1, do I need to modify the query somehow?

    pastedImage_0.png

    Regards,

  • I haven't deployed this hotfix yet, so I don't know if if it may impact your CDP Neighbor Resource.  Please review the hotfix's details here: Success Center and ensure your Main Instance and all APEs have the appropriate version of .NET installed.

    If the version is consistent, please ensure your Custom Query is built as follows:

    pastedImage_1.png

    Custom SWQL Query content:

    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)

    Beyond that, reach out to SolarWinds Technical Support as follows (to save you time):

    1. Open your SW deployment and go to Settings > My Orion Deployment > Diagnostics Tab > Select Collect New Diagnostics for all your pollers.

    2. While the diagnostics are generating, open up a SW Support Case online and provide all the details about what broke, how it was working previously, how it's not working today.   

    3. Once the ticket is created successfully you'll receive an e-mail about it.  Use the case number to upload/attach the diagnostics files to it.

    4. When all the files are successfully uploaded, call Solarwinds Technical Support and ask to talk with someone to troubleshoot the Resource and correct the information so it works with the new hotfix.

    5. After the problem is corrected please provide the fix / info you learned here in this thread so others can benefit from your knowledge.

    Swift packets!

    Rick Schroeder

  • Hi,

    Thanks for the query.

    The problem is still there.

    I have a SW guy i usually talk to but he´s on vacation.

    I´ll post back after i get a hold of him.

    //Martin

  • There have been discussions about a bug in 2019.x, that breaks custom SWQL widgets on the webpage. If you try the query in the „SWQL-Studio“ is it returning the correct results?

  • Hi,

    Uhm, I am so bad with SQL-queries, but this is the result from SWQL studio when I run the query:

    pastedImage_0.png

    //M