cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

mail reports

swede
Engaged Sweeper II
Hi there,

I have just started trying to make use of the reports section of lansweeper - which I must admit seems amazingly powerful.
I have managed to set up the system in a way, that the report that displays new computers and devices that were found in the last 24 hours is sent to a specific mail address. So far so good.

Now I thought that when I open lansweeper and look at the devices, they would no longer be "new", so the reports would stop, but that is not the case. The system keeps sending me the reports until the 24 hours are over. On the one hand I could make it that the report is sent on a daily basis, but then I believe there is too much time between the fact that a new device was found and I heard about it. It would be great if one could reduce this to one hour. I tried changing the -1 after getdate() to -1/24 but that didnt do the trick.

Anyhow I would rather have the system generate a mail when a new device is found, and that's it. Rather immediately. I know that lansweeper has really speedy means of tracking devices on the network, it would just be nice to know about it via mail. Has anyone worked on something similar in the past?

Any thoughts would be helpful.

Thanks
Chris
1 ACCEPTED SOLUTION

Andy_Sismey
Champion Sweeper III
Hi,

You could create a report that checks for assets First Seen in the last hour and run the report every hour, something like this :

tblAssets.Firstseen >
DateAdd(HOUR, -1, GetDate())


So th report would be :

Select Top (1000000) tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tblAssets.Username,
tblAssets.Userdomain,
tsysAssetTypes.AssetTypename As Type,
tblAssets.IPAddress,
tblAssets.Description,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tblAssetCustom.Location,
tsysIPLocations.IPLocation,
tblAssets.Firstseen As [Created at],
tblAssets.Lastseen As [Last successful scan]
From tblAssetCustom
Inner Join tblAssets On tblAssetCustom.AssetID = tblAssets.AssetID
Inner Join tsysAssetTypes On tblAssets.Assettype = tsysAssetTypes.AssetType
Left Outer Join tsysIPLocations On tsysIPLocations.LocationID =
tblAssets.LocationID
Where tblAssets.Firstseen > GetDate() - 1 And tblAssets.Firstseen >
DateAdd(HOUR, -1, GetDate()) And tblAssetCustom.State = 1 And
tblAssets.Assettype <> -1 And tblAssets.Assettype <> 66
Order By tblAssets.AssetName


View solution in original post

2 REPLIES 2

swede
Engaged Sweeper II

Hi Andy and thanks for the response. It was just what I needed. Very helpful.

Andy_Sismey
Champion Sweeper III
Hi,

You could create a report that checks for assets First Seen in the last hour and run the report every hour, something like this :

tblAssets.Firstseen >
DateAdd(HOUR, -1, GetDate())


So th report would be :

Select Top (1000000) tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tblAssets.Username,
tblAssets.Userdomain,
tsysAssetTypes.AssetTypename As Type,
tblAssets.IPAddress,
tblAssets.Description,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tblAssetCustom.Location,
tsysIPLocations.IPLocation,
tblAssets.Firstseen As [Created at],
tblAssets.Lastseen As [Last successful scan]
From tblAssetCustom
Inner Join tblAssets On tblAssetCustom.AssetID = tblAssets.AssetID
Inner Join tsysAssetTypes On tblAssets.Assettype = tsysAssetTypes.AssetType
Left Outer Join tsysIPLocations On tsysIPLocations.LocationID =
tblAssets.LocationID
Where tblAssets.Firstseen > GetDate() - 1 And tblAssets.Firstseen >
DateAdd(HOUR, -1, GetDate()) And tblAssetCustom.State = 1 And
tblAssets.Assettype <> -1 And tblAssets.Assettype <> 66
Order By tblAssets.AssetName