→ 🚀What's New? Join Us for the Fall Product Launch! Register Now !
‎07-23-2021 05:17 PM
‎02-20-2024 02:20 PM
Still trying to get LS to add the IPlocation in the tblmonitorhist table so I can see where these monitors are physically based on IP.
‎02-20-2024 02:19 PM
Hi I created a new report and used these filters ( MAX ).
‎07-23-2021 07:06 PM
‎02-20-2024 02:39 PM
My next step is to get the IP location recorded with each entry so I know where the device is physically. Its not currently part of the table. If I use the assets table the location is the last location of the user on record which is not what I need.
‎07-23-2021 06:59 PM
Select Top 1000000
tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Username,
tblAssetCustom.Custom2,
tblAssetCustom.Custom3,
tblAssets.IPAddress,
tblAssets.Firstseen,
tblAssets.Lastseen,
tsysOS.Image As icon,
MaxMonitorHist.MonitorManufacturer,
MaxMonitorHist.MonitorModel,
MaxMonitorHist.SerialNumber,
MaxMonitorHist.LastAdded
From
tblAssets
INNER JOIN (SELECT
tblMonitorHist.AssetID,
tblMonitorHist.MonitorManufacturer,
tblMonitorHist.MonitorModel,
tblMonitorHist.SerialNumber,
Max(tblMonitorHist.LastChanged) AS LastAdded
FROM
tblMonitorHist
WHERE
tblMonitorHist.Action = 1 -- added
AND tblMonitorHist.LastChanged >= Cast('03-15-2020' As DATETIME)
GROUP BY
tblMonitorHist.AssetID,
tblMonitorHist.MonitorManufacturer,
tblMonitorHist.MonitorModel,
tblMonitorHist.SerialNumber ) AS MaxMonitorHist ON MaxMonitorHist.AssetID = tblAssets.AssetID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tsysOS.OScode = tblAssets.OScode
Where
tblAssetCustom.State = 1
And (tblAssets.IPAddress Like '10.15.%' Or tblAssets.IPAddress Like '10.95.%')
Order By
tblAssets.AssetName
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now