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.

IPAM Scope usage in SWQL

There are already resources in IPAM for scope usage, but I wanted one where I can quickly search on CIDR and scope name

SELECT  dhcpv.FriendlyName as [Scope]

,'/Orion/IPAM/Dhcp.Management.aspx?opento='+dhcpv.FriendlyName as [_LINKFOR_Scope]

,case when dhcpv.StatusIconPostfix = 'up' then '/Orion/IPAM/res/images/sw/icon.scope.ok.gif'

           else CONCAT('/Orion/IPAM/res/images/sw/icon.',dhcpv.GroupIconPrefix,'.',dhcpv.StatusIconPostfix,'.gif')

       end as [_IconFor_Scope]

, dhcpv.Address+'/'+tostring(dhcpv.CIDR) as [ScopeName]

,ceiling(dhcpv.PercentUsed) as [% Used], dhcpv.UsedCount as [Used], dhcpv.AvailableCount as [Avail.], dhcpv.TotalCount as [Total]

FROM IPAM.DHCPView dhcpv

where viewtype=2

order by [% Used] desc

SELECT  dhcpv.FriendlyName as [Scope]

,'/Orion/IPAM/Dhcp.Management.aspx?opento='+dhcpv.FriendlyName as [_LINKFOR_Scope]

,case when dhcpv.StatusIconPostfix = 'up' then '/Orion/IPAM/res/images/sw/icon.scope.ok.gif'

           else CONCAT('/Orion/IPAM/res/images/sw/icon.',dhcpv.GroupIconPrefix,'.',dhcpv.StatusIconPostfix,'.gif')

       end as [_IconFor_Scope]

, dhcpv.Address+'/'+tostring(dhcpv.CIDR) as [ScopeName]

,ceiling(dhcpv.PercentUsed) as [% Used], dhcpv.UsedCount as [Used], dhcpv.AvailableCount as [Avail.], dhcpv.TotalCount as [Total]

FROM IPAM.DHCPView dhcpv

where viewtype=2 and

       (dhcpv.FriendlyName  like '%${SEARCH_STRING}%'

          or dhcpv.StatusIconPostfix  like '%${SEARCH_STRING}%'

         or concat(dhcpv.Address,'/',dhcpv.CIDR) like '%${SEARCH_STRING}%'  )

order by [% Used] desc

pastedImage_0.png

Thanks

Amit