cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post
Level 7

Can't find what I'm looking for using SWQL query

My organisation has pointed me towards our IPAM installation to gather the information I require.

Basically I'm looking for used IP addresses on our network, and the FQDN, although I need to do this using the API with Python, so I can feed the data into another system.

When using the UI, the All used IP Addresses report gives me that information. There are over 20,000 IP addresses

Untitled.jpg

but in Python, when I use the following query, it only returns around 800 results:

SELECT IPAddress, DNS FROM Orion.Nodes

The following query seems to return the right amount of information, however all the values for Description, SysName and DhcpClientName
are "None", and DisplayName is also the IP Address:

SELECT Description, SysName, DhcpClientName, IPAddress, DisplayName FROM IPAM.IPNode where Status = 2

 

Which part of the schema can provide me with the IP Address and FQDN (Reverse DNS or System Name in the report)?

0 Kudos
6 Replies
MVP
MVP

The Orion.Nodes table holds details on the nodes that the system is monitoring (i.e. has been added as a node and can be seen in Manage Nodes). The ~900 results would be the `900 nodes in your system.

The IPAM.IPNode table shows all the IPAM IP address information. If you don't see the hostnames in IPAM, they won't appear in that table either.

This is the correct answer.  You should look for those information on the IPAM_IPNode table.

Level 16

SELECT TOP 10 NodeID, IPAddress, Caption, DNS, IP, IP_Address, IPAddressGUID, NodeName
FROM Orion.Nodes

 

I believe when a node is added Orion does a lookup and adds whatever is returned into the DNS Field. If you manually enter a name under Caption what ever is entered in that field is what is shown as the node name. The above query shows all of the names in the Orion.Nodes table. I don't own IPAM so don't know if there additional tables you can pull. The DNS field is what I would assume is where the FQDN name is held, but I could be wrong.

 

0 Kudos

Thanks for you response,

That does work, the IP and the hostname (FQDN) is reflected in the DNS field.

However it only returns around 900 results, whereas if I scrape all of the DHCP servers in our organisation, there are around 30000 entries,

and the IPAM report shows around 24500 entries. Perhaps I just don't understand how the system works but Orion.Nodes is not a good representation of what exists in our environment.

0 Kudos

My boss also directed me towards this assignment but I was facing some problems. Since you obtained the astonishing results by using the SWQL query, I would also do the same. Thanks for providing cheap dissertation writing services and making things so simple for me.

0 Kudos

My boss also directed me towards this assignment but I was facing some problems. Since you obtained the astonishing results by using the SWQL query, I would also do the same. Thanks for providing cheap dissertation writing services and making things so simple for me.

0 Kudos