Today with the help of wluther I was able to create a very simple and useful query:
SELECT IPAddress as [interfaceIP] --IP Assigned to the interface specifically ,IpAddresses.Interfaces.InterfaceDescription ,IPAddresses.Interfaces.Interfacealias as [Alias] ,IPAddresses.Interfaces.Node.NodeCaption as [Node] ,IPAddresses.Interfaces.Node.AgentIP as [PollingNodeIP]--IP Assigned to relevant node FROM Cirrus.IpAddresses WHERE (IPAddresses.Interfaces.Node.YOURCUSTOMPROPERTY LIKE 'VALUE' AND IPAddress LIKE '172.17.%') OR (IPAddresses.Interfaces.Node.YOURCUSTOMPROPERTY LIKE 'VALUE' AND IPAddress LIKE '172.18.%')
This is possibly the shortest form of this type of query I've created but will let you grab an interface, it's caption, it's IP address, the node's IP and it's caption, and smush it all together reasonably nicely to search for things with problems. I use this to find when a WAN link was misconfigured.
I'm about 99% sure this requires NCM, thus this is posted there.Result using SiteID/Alias, but hiding PollingNodeIP: