Log file monitoring

This topic contains 2 replies, has 3 voices, and was last updated by  postanote 2 months, 2 weeks ago.

  • Author
    Posts
  • #95415

    Don Bosco
    Participant

    Hi Team,

    I'm looking for a script that will search multiple log files for a string with date and time and write an event if the error is found.

    2018-02-11 01:51:34,509 ERROR [org.jboss.as] JBAS015950: [.c.m.s.a.AgentSchedulesService] Saving 'No

  • #95432

    Don Jones
    Keymaster

    We don't really offer a script gallery here, but Microsoft does on TechNet. If this is something you're looking to build yourself and have a question, please feel free to ask the question here!

  • #95438

    postanote
    Participant

    If they are just text files, then there are many resoures you can leverage to accomplish this.

    Parsing Log files using windows PowerShell
    Why not use the power of select-string to find
    'blogs.technet.microsoft.com/fun_with_powershell/2013/10/22/parsing-log-files-using-windows-powershell'

    PowerShell: Find Strings In Specific Files And Output To A Log File
    This is a very easy and short script which does the following:Loop recursively through the root directory of the script (from where it is run).Search for all *.txt filesGet the contents of those filesMatch the contents of those *.txt files each entry in a control file (control_fi
    'gallery.technet.microsoft.com/scriptcenter/PowerShell-Find-Strings-In-67986e1b'

    Use an Easy PowerShell Command to Search Files for Information
    Summary: Learn how to use a Windows PowerShell command to search easily for information in a collection of files.
    'blogs.technet.microsoft.com/heyscriptingguy/2011/08/04/use-an-easy-powershell-command-to-search-files-for-information'

You must be logged in to reply to this topic.