Scanning Success Per IP Location
Miscellaneous ScanningSee How Successful Your Scanning Is in Each IP Location
Using the IP locations to organize your assets is only the start. By using this grouping and combining it with all the other metrics available in Lansweeper, you can get data on your assets grouped by their IP location. This allows you to get a better sense of which IP locations need additional attention.
With the report below, you get an overview of all your IP locations, the total number of assets in them, how many of those assets are scanned successfully, and how many of the assets are scanned unsuccessfully. You can read more about this use case and find other useful events to scan in the Pro Tips #9 blog post.
Scanning Success Per IP Location Query
Select tsysIPLocations.IPLocation, tsysIPLocations.Realstart + ' ' + '-' + ' ' + tsysIPLocations.Realend As IPRange, a.Assets, b.AssetsSuc As [Assets Successful], c.AssetsFail As [Assets Failed], Cast((Cast(Convert(DECIMAL(10,2),b.AssetsSuc) As float) / Cast(Convert(DECIMAL(10,2),a.Assets) As float)) * 100 As numeric(36,2)) As [% Successful] From tsysIPLocations Left Join (Select Count(tblassets.AssetID) As Assets, tblassets.LocationID From tblassets Inner Join tblAssetCustom On tblassets.AssetID = tblAssetCustom.AssetID Inner Join tblState On tblState.State = tblAssetCustom.State Where tblState.Statename = 'Active' And tblassets.Assettype <> 66 Group By tblassets.LocationID) As a On a.LocationID = tsysIPLocations.LocationID Left Join (Select Count(tblassets.AssetID) As AssetsSuc, tblassets.LocationID From tblassets Inner Join tblAssetCustom On tblassets.AssetID = tblAssetCustom.AssetID Inner Join tblState On tblState.State = tblAssetCustom.State Where tblassets.Lastseen = tblassets.Lasttried And tblState.Statename = 'Active' Group By tblassets.LocationID) As b On b.LocationID = tsysIPLocations.LocationID Left Join (Select Count(tblassets.AssetID) As AssetsFail, tblassets.LocationID From tblassets Inner Join tblAssetCustom On tblassets.AssetID = tblAssetCustom.AssetID Inner Join tblState On tblState.State = tblAssetCustom.State Where (tblassets.Lastseen <> tblassets.Lasttried And tblState.Statename = 'Active') Or (tblState.Statename = 'Active' And tblassets.Lastseen Is Null) Group By tblassets.LocationID) As c On c.LocationID = tsysIPLocations.LocationID Order By a.Assets Desc