Kaseya Community

Search Specific words in log files

  • Hey forum folks,

    I've been trying to set up a way to have Kaseya search for a specific word in a .txt file used for output for a Robocopy job. Basically i'm looking for specific errors.

    Barring putting running the output into event viewer, what are my options. I'd like to create a script or use log parser to find the errors I want to find.

    Does anyone have any leads or links to other posts they could send me. I haven't found anything in my searching around the forum yet but I will keep looking.

    Thanks
    -- Eric.

    Legacy Forum Name: Search Specific words in log files,
    Legacy Posted By Username: ericjosepi
  • you can run a script to "get file content" and look for a specific phrase or word and go from there.

    Legacy Forum Name: How-To,
    Legacy Posted By Username: thirteentwenty
  • thirteentwenty
    you can run a script to "get file content" and look for a specific phrase or word and go from there.


    Is that a feature of Kaseya v.6? I don't have this option in my scripting (and before it's asked I'm a master user).

    Legacy Forum Name: How-To,
    Legacy Posted By Username: ericjosepi
  • In the script, Get Variable, next line "File Content"

    Legacy Forum Name: How-To,
    Legacy Posted By Username: thirteentwenty
  • If you only want to search for one specific word in a text file, and act accordingly, then this is very easy in Kaseya. You don't need to get it into a variable - you can test it directly in the file.

    Use the "If" section at the top of a new script - Select "Test File".
    Put the path to the file in next, then select "Contains" and put what you're searching for.

    You can then put what actions you want to carry out if the word is present, or not present.

    This could be calling other scripts, or writing different results to the script log etc.

    Hope this helps.

    Legacy Forum Name: How-To,
    Legacy Posted By Username: sburbidge