cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
ehj
Engaged Sweeper
How can I query from event viewer.

I can find 2 tables but no connection with computer

tsysEventAlerts
tsysEventfilter
5 REPLIES 5
Hemoco
Lansweeper Alumni
You an use filter
>=getdate()-1
googoo
Engaged Sweeper III
I think I figured it out:

Select Top 1000000 tblcomputers.Computer, tblntlogevent.Eventcode, tblntlogevent.Logfile, tblntlogevent.Message, tblntlogevent.Sourcename, tblcomputers.Description, tblntlogevent.TimeGenerated From tblntlogevent Inner Join tblcomputers On tblcomputers.Computername = tblntlogevent.Computername Where tblntlogevent.Eventcode = 7 And tblntlogevent.Sourcename = 'disk' And DateDiff(d, tblntlogevent.TimeGenerated, Current_TimeStamp) <= 2
googoo
Engaged Sweeper III
Does anyone know how to change this query to only report entries from the current day?
ehj
Engaged Sweeper
Works great

Now I have a report that shows all machines with an error on hard drives.


Select Top 1000000 tblcomputers.Computer, tblntlogevent.Eventcode, tblntlogevent.Logfile, tblntlogevent.Message, tblntlogevent.Sourcename, tblcomputers.Description From tblntlogevent Inner Join tblcomputers On tblcomputers.Computername = tblntlogevent.Computername Where tblntlogevent.Eventcode = 7 And tblntlogevent.Sourcename = 'disk'
Hemoco
Lansweeper Alumni
You need table "tblntlogevent"