« Previous Next »

Thread: Event logs Parsing issue

Last post 10-07-2009 9:03 AM by mritorto. 0 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (1 items)

Sort Posts:

  • 10-07-2009, 9:03 AM

    • mritorto
    • Not Ranked
    • Joined on 10-06-2009, 10:15 AM
    • Posts 1

    Event logs Parsing issue

     Guys,

     

    Here is my issue I have a batch job that runs log parser to collect the event logs from my servers and dumps the info into an excel spreadsheet.

     

    Some times it works perfectly and some times it does not.  The record titles like computername or timegenerated some times show up in the spreadsheet and other times it does not not.

     

    Any idea why. I do have other batch files that run thru out the day looking the servers for specfic event log error messages like account lockouts but the one listed below only runs once per day.

     

    I even run it from a different machine and I get the same results

     

    Any help would be appreciated.

     

     

     

     

     

     



    for /f %%i in (servers.txt) do logparser "select  distinct timegenerated,EventID,EventTypeName,Strings,ComputerName,Message into eventlogs.csv from \\%%i\application where  eventtypename like 'error event' and timegenerated >= to_localtime (sub(system_timestamp(), timestamp ('23','hh') ) ) order by timegenerated " -i:evt -o:csv -filemode:0 
     

Page 1 of 1 (1 items)
Microsoft Communities