08-17-2023 11:55 AM
We are using LSAgent in our Organization also for scanning Linux Devices.
I just noticed, that the LsAgent Scans on the Linux Devices are not even reporting back that the device is a Linux device. The scanned information reported from LsAgent on Linux devices is very limited.
Below is an example of a Ubuntu Device scaned with LsAgent version 10.4.2.1.
Do you have similar experince, or is there something I can do, to get more information about the scanned device from LsAgent?
P.S. Windows devices scanned with LsAgent are fine.
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName As [Asset Name],
tblLsAgentGroup.Name As [LsAgent Group],
tblAssets.LastLsAgent As [Last LsAgent Scan],
tblAssets.LsAgentVersion,
tblLsAgentAssetState.statename As Status,
tblAssets.Domain,
tblAssets.Username,
tblAssets.IPAddress As [Last known IP],
tsysOS.OSname As OS,
tblAssets.SP As [Service Pack],
tblAssets.Description
From tblAssets
Inner Join tblLsAgentAsset On tblLsAgentAsset.AssetID = tblAssets.AssetID
Inner Join tblLsAgentAssetState On tblLsAgentAssetState.id =
tblLsAgentAsset.Status
Inner Join tblLsAgentGroup On tblLsAgentGroup.LsAgentGroupID =
tblLsAgentAsset.LsAgentGroupID
Left Join tsysOS On tblAssets.OScode = tsysOS.OScode
Order By [Last LsAgent Scan] Desc,
[Asset Name]
Here is the SQL of the Query.
Solved! Go to Solution.
08-21-2023 11:23 AM
There was some code missing in your query, I've added it. Please use this query, should show you the OS version for your Linux machines:
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName As [Asset Name],
tblLsAgentGroup.Name As [LsAgent Group],
tblAssets.LastLsAgent As [Last LsAgent Scan],
tblAssets.LsAgentVersion,
tblLsAgentAssetState.statename As Status,
tblAssets.Domain,
tblAssets.Username,
tblAssets.IPAddress As [Last known IP],
Case
When tsysOS.osname Is Not Null Then tsysOS.osname
When tblLinuxSystem.OSRelease Is Not Null Then tblLinuxSystem.OSRelease
Else ''
End As OS,
tblAssets.SP As [Service Pack],
tblAssets.Description
From tblAssets
Inner Join tblLsAgentAsset On tblLsAgentAsset.AssetID = tblAssets.AssetID
Inner Join tblLsAgentAssetState On tblLsAgentAssetState.id =
tblLsAgentAsset.Status
Inner Join tblLsAgentGroup On tblLsAgentGroup.LsAgentGroupID =
tblLsAgentAsset.LsAgentGroupID
Left Outer Join tblLinuxSystem On tblAssets.AssetID = tblLinuxSystem.AssetID
Left Join tsysOS On tblAssets.OScode = tsysOS.OScode
Order By [Last LsAgent Scan] Desc,
[Asset Name]
As a rule of thumb, if the asset summary page displays the OS information and the query result is a blank field, then there is a missing join somewhere 🙂 We recommend checking the code of existing reports to see how the joins are made for OS queries and also the database documentation, available from the Reports section on your web console
08-21-2023 11:57 AM
@David_GF , thanks, that works.
08-21-2023 11:23 AM
There was some code missing in your query, I've added it. Please use this query, should show you the OS version for your Linux machines:
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName As [Asset Name],
tblLsAgentGroup.Name As [LsAgent Group],
tblAssets.LastLsAgent As [Last LsAgent Scan],
tblAssets.LsAgentVersion,
tblLsAgentAssetState.statename As Status,
tblAssets.Domain,
tblAssets.Username,
tblAssets.IPAddress As [Last known IP],
Case
When tsysOS.osname Is Not Null Then tsysOS.osname
When tblLinuxSystem.OSRelease Is Not Null Then tblLinuxSystem.OSRelease
Else ''
End As OS,
tblAssets.SP As [Service Pack],
tblAssets.Description
From tblAssets
Inner Join tblLsAgentAsset On tblLsAgentAsset.AssetID = tblAssets.AssetID
Inner Join tblLsAgentAssetState On tblLsAgentAssetState.id =
tblLsAgentAsset.Status
Inner Join tblLsAgentGroup On tblLsAgentGroup.LsAgentGroupID =
tblLsAgentAsset.LsAgentGroupID
Left Outer Join tblLinuxSystem On tblAssets.AssetID = tblLinuxSystem.AssetID
Left Join tsysOS On tblAssets.OScode = tsysOS.OScode
Order By [Last LsAgent Scan] Desc,
[Asset Name]
As a rule of thumb, if the asset summary page displays the OS information and the query result is a blank field, then there is a missing join somewhere 🙂 We recommend checking the code of existing reports to see how the joins are made for OS queries and also the database documentation, available from the Reports section on your web console
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now