cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
brandon_jones
Champion Sweeper III

I would like a chart that shows the top sources of errors in event viewer in the last 14 days on active assets only. I have tried it but something is still not right. Any help would be appreciated.

1 ACCEPTED SOLUTION
brandon_jones
Champion Sweeper III

This is the report that I created to get the information that I needed:

Select Top 20 tblNtlogSource.Sourcename,
Count(tblAssets.AssetID) As Total
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tblNtlog On tblAssets.AssetID = tblNtlog.AssetID
Inner Join tblNtlogSource On tblNtlogSource.SourcenameID =
tblNtlog.SourcenameID
Where tblAssetCustom.State = 1 And tblAssets.Assettype = -1 And
tblNtlog.Eventtype = 1 And tblNtlog.TimeGenerated > GetDate() - 14
Group By tblNtlogSource.Sourcename
Order By Total Desc

View solution in original post

8 REPLIES 8
brandon_jones
Champion Sweeper III

This is the report that I created to get the information that I needed:

Select Top 20 tblNtlogSource.Sourcename,
Count(tblAssets.AssetID) As Total
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tblNtlog On tblAssets.AssetID = tblNtlog.AssetID
Inner Join tblNtlogSource On tblNtlogSource.SourcenameID =
tblNtlog.SourcenameID
Where tblAssetCustom.State = 1 And tblAssets.Assettype = -1 And
tblNtlog.Eventtype = 1 And tblNtlog.TimeGenerated > GetDate() - 14
Group By tblNtlogSource.Sourcename
Order By Total Desc
rader
Champion Sweeper III

Nicely done Brandon. I'm gonna have to steal this.

rader
Champion Sweeper III

There's the standard Lansweeper created Chart: Eventlog errors last 14 days in the report section.

Code below:

Select Top 1000000 Convert(nVARCHAR(10),tblNtlog.TimeGenerated,102) As Thedate,
  Count(tblAssets.AssetID) As Total
From tblAssets
  Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
  Inner Join tblNtlog On tblAssets.AssetID = tblNtlog.AssetID
Where tblAssetCustom.State = 1 And tblAssets.Assettype = -1 And
  tblNtlog.Eventtype = 1 And tblNtlog.TimeGenerated > GetDate() - 14
Group By Convert(nVARCHAR(10),tblNtlog.TimeGenerated,102)
Order By Thedate Desc
brandon_jones
Champion Sweeper III

Thanks for the reply, but I would like a bar graph that counts the top 20 sources of the events from the last 14 days.

rader
Champion Sweeper III

Need some clarification on the question. The top 20 sources: are you asking for the assets or the events as the source?

brandon_jones
Champion Sweeper III

The events.

brandon_jones
Champion Sweeper III

I do not see that in my reports. I also looked in the report resources on the Lansweeper website and I don't see anything listed with that name. Can you please paste the SQL code here?

Thanks

Mister_Nobody
Honored Sweeper II

There are standard widgets:

Event Summary Workstations 

Event Summary Servers

you can set 14 days