cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
IFIT
Engaged Sweeper III
It would be nice to know when an asset get physically moved from one location/subnet to another one. Yes, this has happened to us, and by the time we caught it, no one knew who did it.
I could not find a table that stored a previous IP Location or IP Number that could be used to compare to the current one. Any suggestions on where to start would be greatly appreciated.
1 ACCEPTED SOLUTION
Daniel_B
Lansweeper Alumni
For this you need to enable history logging for network adapter information. Under Configuration\Item Wait Time, enable history logging for NETWORK. From this moment on Lansweeper will generate a history table called tblNetworkHist. A report like the following example lists network adapters for which the IP address was recently changed.

Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblNetwork.IPAddress As [current IP],
tsysIPLocations.IPLocation As [current IP location],
tblNetworkHist.IPAddress As [recent IP],
tblAssets.Lastseen,
tblAssets.Lasttried
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblNetworkHist On tblAssets.AssetID = tblNetworkHist.AssetID
Left Join tsysIPLocations On tblAssets.IPNumeric >= tsysIPLocations.StartIP
And tblAssets.IPNumeric <= tsysIPLocations.EndIP
Inner Join tblNetwork On tblAssets.AssetID = tblNetwork.AssetID
Where tblNetworkHist.MACaddress = tblNetwork.MACaddress And
tblNetworkHist.IPAddress <> tblNetwork.IPAddress And tblAssetCustom.State = 1
And tblNetworkHist.IPEnabled = 1 And tblNetwork.IPEnabled = 1
Order By tblNetworkHist.Lastchanged Desc

View solution in original post

2 REPLIES 2
IFIT
Engaged Sweeper III
Perfect!!
Thanks Daniel, it works like a charm.
Daniel_B
Lansweeper Alumni
For this you need to enable history logging for network adapter information. Under Configuration\Item Wait Time, enable history logging for NETWORK. From this moment on Lansweeper will generate a history table called tblNetworkHist. A report like the following example lists network adapters for which the IP address was recently changed.

Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblNetwork.IPAddress As [current IP],
tsysIPLocations.IPLocation As [current IP location],
tblNetworkHist.IPAddress As [recent IP],
tblAssets.Lastseen,
tblAssets.Lasttried
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblNetworkHist On tblAssets.AssetID = tblNetworkHist.AssetID
Left Join tsysIPLocations On tblAssets.IPNumeric >= tsysIPLocations.StartIP
And tblAssets.IPNumeric <= tsysIPLocations.EndIP
Inner Join tblNetwork On tblAssets.AssetID = tblNetwork.AssetID
Where tblNetworkHist.MACaddress = tblNetwork.MACaddress And
tblNetworkHist.IPAddress <> tblNetwork.IPAddress And tblAssetCustom.State = 1
And tblNetworkHist.IPEnabled = 1 And tblNetwork.IPEnabled = 1
Order By tblNetworkHist.Lastchanged Desc