Quantcast
Channel: THWACK: Message List
Viewing all articles
Browse latest Browse all 20625

Re: Re: Need an IPAM "inventory" report

$
0
0

Those are your FriendlyName entries under GroupType 'Group'

 

For Instance:

 

SELECT      t.GroupType,      g.FriendlyName,      g.Address,      g.AddressMask,      g.CIDR,      g.Comments  
FROM IPAM_Group g  
JOIN IPAM_GroupType t ON t.GroupTypeID = g.GroupType 
WHERE t.GroupType IN ('Group', 'Subnet', 'Supernet') 
ORDER BY t.GroupType, g.FriendlyName

 

Gives you this:

 

ipam results.jpg

 

Which is a representation of this:

 

ipam_manage pic.jpg

 

 

However, to get tricky and show the parent/child relationships of the groups and subgroups, you need to get a little fancy:

 

SELECT  grv1.GROUPTYPE AS 'TYPE',      CASE WHEN grv2.FRIENDLYNAME IS NULL           THEN 'NO PARENT'           ELSE grv2.FRIENDLYNAME      END AS 'PARENT NAME',  grv1.FRIENDLYNAME AS 'GROUP NAME',  grv1.ADDRESS AS 'NETWORK ADDRESS',  grv1.CIDR
FROM IPAM_GROUPREPORTVIEW grv1
JOIN IPAM_GROUPREPORTVIEW grv2 ON grv1.PARENTID = grv2.GROUPID
WHERE grv1.GROUPTYPE IN ('GROUP', 'SUBNET', 'SUPERNET','ROOT')
ORDER BY grv1.GROUPTYPE

 

 

And here you go!

 

IPAM_Groups_Report.OrionReport

 

It's a little cleaner if you take this SQL and use the web-based report writer.

 

-ZackM

http://www.loop1systems.com


Viewing all articles
Browse latest Browse all 20625

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>