→ 🚀What's New? Explore Lansweeper's Fall 2024 Updates! Fall Launch Blog !

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
jmm25
Engaged Sweeper
I updated to the latest release of Lansweeper today and was promptly informed on my next login that there were 25 devices in 'computer not seen in 30 days', where previously there had been one- a machine that hasn't been turned on since the COVID-19 shutdowns. I checked the report. Apparently the new version of Lansweeper sees locations as worthy of being reported under this heading. And several, but not all, monitors. And several non-computer assets.

How do I edit the report to make it stop telling me that the Boston server closet hasn't been successfully scanned in thirty days? It is literally a room, and has never been scanned, so I don't know why this asset type is suddenly triggering reports that are only supposed to cover computers.

Oh, I made a point of downloading the report code from Lansweeper's forum, then hitting 'save and run', just in case some past formatting edit was responsible for the bad information, but even the downloaded version still wants me to know that Lansweeper hasn't seen the Boston Office Kitchen Area in more than thirty days. I ran a scan of all assets in the company- around 200 thanks to monitors, etc.- and it's still showing locations, eight monitors, several pieces of network hardware, and the one computer as not having been seen in thirty days. What edit do I need to make to get it to stop telling me this?
1 ACCEPTED SOLUTION
KevinA-REJIS
Champion Sweeper III
I made the following edit on our report:

Where tblAssets.Lastseen < GetDate() - 30 And tblState.Statename = 'Active' And
tblComputersystem.Domainrole Is Not Null

View solution in original post

5 REPLIES 5
Shawn_Heydorn
Engaged Sweeper
Hello,
I find this works best for last seen computers over 30 days view.

The date format in this shows me 31 to 60 days only.
tblAssets.Lastseen Between DateAdd(day, -60, Current_TimeStamp) And
DateAdd(day, -31, Current_TimeStamp)

Here is for which asset type you want to be displayed.
From TblAssets
Inner Join tblComputersystem On tblAssets.AssetID = tblComputersystem.AssetID

Where ...
tblComputersystem.Domainrole > 1 (servers)
tblAssetCustom.Model Not Like '%virtual%' And tblComputersystem.Domainrole < 2 (workstations)

The full report below.
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tblAssets.Username,
tblAssets.Userdomain,
Coalesce(tsysOS.Image, tsysAssetTypes.AssetTypeIcon10) As icon,
tblAssets.IPAddress,
tsysIPLocations.IPLocation,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tsysOS.OSname As OS,
tblAssets.SP,
tblAssets.Lastseen,
tsysAssetTypes.AssetTypename
From tblAssets
Left Join tsysOS On tsysOS.OScode = tblAssets.OScode
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tsysIPLocations On tsysIPLocations.LocationID =
tblAssets.LocationID
Inner Join tblState On tblState.State = tblAssetCustom.State
Left Join tblComputersystem On tblAssets.AssetID = tblComputersystem.AssetID
Where tblAssets.Lastseen Between DateAdd(day, -999, Current_TimeStamp)
And DateAdd(day, -30, Current_TimeStamp) And tsysAssetTypes.AssetTypename Like
'Windows%' And tblComputersystem.Domainrole < 2 And tblState.Statename =
'Active'
Order By tblAssets.Lastseen,
tblAssets.AssetName,
tblAssets.Username
JSchlackman
Engaged Sweeper III
Support have informed me that this report is in fact not intended to show all 'not seen' computer assets, only Windows assets. They did confirm this issue is being tracked as LAN-4683 and will be fixed in an upcoming release.
JSchlackman
Engaged Sweeper III
This isn't a fix that works for everyone as it would exclude non-Windows computers such as Macs and Linux machines, which should normally appear in this report (and several other "Computer:" reports).

We really need to know exactly what changed in the db to break the existing query in order to determine a fix that covers all use cases. I intend to open a support case to get to the bottom of it.
KevinA-REJIS
Champion Sweeper III
I made the following edit on our report:

Where tblAssets.Lastseen < GetDate() - 30 And tblState.Statename = 'Active' And
tblComputersystem.Domainrole Is Not Null
KevinA-REJIS wrote:
I made the following edit on our report:

Where tblAssets.Lastseen < GetDate() - 30 And tblState.Statename = 'Active' And
tblComputersystem.Domainrole Is Not Null


That seems to have worked. Thank you.