BrianG

Event Source for log file monitoring

Recommended Posts

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?

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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 ?

 

Share this post


Link to post
Share on other sites

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).

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.