Enter this text into a Custom Query Resource to get a list of your subnet scans that are delayed beyond your scan interval time. (Note: update the where…. 25 below to be the number of your longest scan interval +1 hour or so)
--Begin Code
--Resource object used: Custom Query Object Resource
--Resource Location: Miscellaneous -> Custom Query
--View(s) using this: IP Address Manager Summary
--Select DB columns and hyperlink fields
SELECT distinct s.subnet.friendlyname as Subnet, '/Orion/IPAM/Subnets.aspx?opento=' + ToString(s.subnetid) AS [_LinkFor_Subnet], '/Orion/IPAM/res/images/sw/icon.subnet.' + case s.subnet.statusiconpostfix when 'up' then 'ok' else s.subnet.statusiconpostfix end + '.gif' AS [_IconFor_Subnet], s.subnet.vlan, queuetimestamp as [Next Scan],
--Geting Next Scan value in hours to show how long the scan is delayed from current datetime
tostring(HourDiff(queuetimestamp, getdate())) + ' hrs' as [Delayed Hours]
from IPAM.ScanInstance s
--Filter Info
-- Define value to be slightly larger then your largest subnet scan interval
--I am using 25hours since my largest scan interval is 24hours and I am ok with that level of sensitivity
where HourDiff(queuetimestamp, getdate()) > 25
-- Sort by most delayed scans
order by [Delayed Hours] desc
--End Code