Forum Discussion

BrianG's avatar
5 years ago

Event Source for log file monitoring

We're looking to have log file monitoring for file extension *.rpt and SQL log files. LM does not appear to support anything (out of the box) other than .log and .txt. Has anyone done this via script with other file types in Windows? If so, can you share your solution?

5 Replies

  • Anonymous's avatar
    Anonymous

    It's not the extension that you're limited to, it's the encoding. For example, if it's a plain text file, LM can monitor output.out. I'm not familiar enough with RPT and SQL log files. Are they not plain text?

  • Piggybacking on this thread

    Are tokens supported within filepaths for eventsources?

    e.g. If the eventsource applies to "Product Category"

    And the Logfile Path could be  \\#HOSTNAME#\C$\Program Files\Application\Log\debug.log ?

     

  • Anonymous's avatar
    Anonymous

    For logfile EventSources, it will only look at logs on which the collector is installed. The idea would be to install collectors on the servers where you want logs monitored.

    If you want to monitor logs on a different device (or too many to install collectors on all of them), you'll need to move to a Groovy based ES, which could pull in the hostname using:

    hostProps.get("system.hostname")

    You could also pull in any properties in the same manner to use as part the path you generate to pull the files. You could use several mechanisms in Groovy to pull the content from the remote server for processing within your script (on the collector).