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.

Associate IP addresses with Hostnames

Hi all,

I have a list of IP addresses in a spreadsheet that I would like to associate with their devices hostnames, some of them are SVIs so that might require further lookup in the database later, what SWQL query can I use to get the management IPs associated with their hostnames?

I used the one below but it can only look one at a time and I'm not sure how I can give it my full list, I have hundreds of addresses!

SELECT n.caption, n.NodeID, n.IPAddress 

FROM Orion.Nodes n

WHERE n.IPAddress = '0.0.0.0'

Maybe there's a better way to do this? Somewhere where I can feed it an excel sheet? I don't know, maybe a list syntax in SWQL would suffice but I don't what that might be.

Thank you!

  • Does anyone know how I can provide it with a list like this?

    SELECT n.caption, n.NodeID, n.IPAddress

    FROM Orion.Nodes n

    WHERE n.IPAddress = {'0.0.0.0', '1.1.1.1'};

    Or whatever the SWQL syntax is for lists.

  • tigerr​ There is a table, Orion.NodeIPAddresses, which I believe holds ALL IPs found for/on ALL nodes.

    This SWQL query should show you every IP for every node in your system.

    SELECT
    NodeIPAddresses.Node.Caption
    ,NodeID
    ,IPAddress
    FROM Orion.NodeIPAddresses

    If you are wanting to filter it from a specific list of IPs in your spreadsheet, then you can do a couple of find/replaces in notepad++ (or whichever text editor you like), and build a filter.

    WHERE IPAddress IN ('192.168.1.1','192.168.1.2','172.22.14.1','8.8.8.8')

    Is this what you are looking for? Please let us know if this gets you going in the correct direction.

    Thank you,

    -Will

  • tigerr​ Also, just a note there, depending on your network/devices, you will likely notice multiple devices having the same IP.

  • tigerr Are you trying to add something INTO your Orion environment, or are you trying to export a list of node details FROM your Orion environment?

    If you have good data in your system already, you can export just about everything from the custom properties page. You can also import data back into the system as well.

    Export Custom Properties_20190430_1053.png

    Would something like this get you to where you need to be?

    Thank you,

    -Will

  • wluther​ this is amazing, I got the list that I needed, I had a mix of IP addresses which included SVIs that belonged to the same devices, I wanted to locate those specific IPs within Solarwinds to login and fix the issues they were originally flagged for but I'm not adding anything to Solarwinds itself. Thank you very much!

  • That's true and can be helpful also, thank you! emoticons_happy.png