→ The Lansweeper Customer Excellence Awards 2024 - Submit Your Project Now! Learn More & Enter Here
‎09-27-2023 10:10 PM
See screenshot. I copied this report from lansweeper in "download reports" but for some reason this error will not go away and I don't know how to fix it. SQL is not my strong suit here.
Solved! Go to Solution.
‎09-29-2023 01:38 PM
Hello there!
I will report this to our marketing team as there indeed appears to be an error with this report. Thanks for reporting it!
‎09-28-2023 01:47 PM
Yeah here is that link. https://www.lansweeper.com/report/windows-performance-counters-statistics/ and the code below.
Select Top 1000000 a.AssetID,
Min(a.AssetName) As AssetName,
Min(a.Domain) As Domain,
Min(Coalesce(os.Image, at.AssetTypeIcon10)) As icon,
Min(a.IPAddress) As IPAddress,
Min(ipl.IPLocation) As IPLocation,
Min(ac.Manufacturer) As Manufacturer,
Min(ac.Model) As Model,
Min(os.OSname) As OsName,
Min(a.Lastseen) As Lastseen,
Min(a.Lasttried) As Lasttried,
Min(pcm.Name) As MetricName,
Min(pcm.Unit) As Unit,
Round(Cast(Avg(pcsm.Value) As float), 0) As Average,
Min(pcsm.Value) As MinValue,
Max(pcsm.Value) As MaxValue,
Min(pcsmi.Name) As Identifier
From tblAssets a
Inner Join tblAssetCustom ac On a.AssetID = ac.AssetID
Inner Join tsysAssetTypes at On at.AssetType = a.Assettype
Inner Join tsysIPLocations ipl On ipl.LocationID = a.LocationID
Inner Join tblState On tblState.State = ac.State
Left Join tsysOS os On os.OScode = a.OScode
Inner Join tblPerformanceCountersScan pcs On pcs.AssetId = a.AssetID
Inner Join tblPerformanceCountersScanMetric pcsm On
pcsm.PerformanceCountersScanId = pcs.Id
Inner Join tsysPerformanceCounterMetric pcm On pcm.Id = pcsm.Metric
Left Join tblPerformanceCountersScanMetricIdentifier pcsmi On
pcsmi.Id = pcsm.PerformanceCountersScanMetricIdentifierId
Where tblState.Statename = 'Active' And pcs.ScanDateTime > GetDate() - 30 And
a.Assettype = -1
Group By a.AssetID,
pcm.Id,
pcsmi.Id
Order By AssetName,
MetricName
‎09-29-2023 01:38 PM
Hello there!
I will report this to our marketing team as there indeed appears to be an error with this report. Thanks for reporting it!
‎09-29-2023 02:07 PM
Thank you. I also would like to point out this report as well as it does not seem to work either.
Windows & Linux Performance Stats - Lansweeper IT Asset Management
Select Top 1000000 a.AssetID,
Min(a.AssetName) As AssetName,
Min(a.Domain) As Domain,
Min(Coalesce(os.Image, at.AssetTypeIcon10)) As icon,
Min(a.IPAddress) As IPAddress,
Min(ipl.IPLocation) As IPLocation,
Min(ac.Manufacturer) As Manufacturer,
Min(ac.Model) As Model,
Case Min(a.Assettype)
When -1 Then Min(os.OSname)
When 11 Then Min(ls.OSRelease)
Else ''
End As OsName,
Min(a.Lastseen) As Lastseen,
Min(a.Lasttried) As Lasttried,
Min(pcm.Name) As MetricName,
Min(pcm.Unit) As Unit,
Round(Cast(Avg(pcsm.Value) As float), 0) As Average,
Min(pcsm.Value) As MinValue,
Max(pcsm.Value) As MaxValue,
Min(pcsmi.Name) As Identifier
From tblAssets a
Inner Join tblAssetCustom ac On a.AssetID = ac.AssetID
Inner Join tsysAssetTypes at On at.AssetType = a.Assettype
Inner Join tsysIPLocations ipl On ipl.LocationID = a.LocationID
Inner Join tblState On tblState.State = ac.State
Left Join tsysOS os On os.OScode = a.OScode
Left Join tblLinuxSystem ls On ls.AssetID = a.AssetID
Inner Join tblPerformanceCountersScan pcs On pcs.AssetId = a.AssetID
Inner Join tblPerformanceCountersScanMetric pcsm On
pcsm.PerformanceCountersScanId = pcs.Id
Inner Join tsysPerformanceCounterMetric pcm On pcm.Id = pcsm.Metric
Left Join tblPerformanceCountersScanMetricIdentifier pcsmi On
pcsmi.Id = pcsm.PerformanceCountersScanMetricIdentifierId
Where tblState.Statename = 'Active' And pcs.ScanDateTime > GetDate() - 30
Group By a.AssetID,
pcm.Id,
pcsmi.Id
Order By AssetName,
MetricName
‎09-29-2023 02:10 PM
Hello there!
So I see. I will add that one to the marketing ticket as well and there appears to be a broken image on that page as well. 🤔
‎09-29-2023 02:12 PM
Thank you. Hopefully they can get it fixed.
‎09-28-2023 01:02 PM
'at' is reserved word.
You must use always [at] or use another alias - my_at, for example.
‎09-28-2023 12:56 PM
Paste code not screenshot, please.
‎09-28-2023 10:48 AM
Hello there!
Would you be able to provide a link to the report that you have downloaded?
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now