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?
BrianG
5 comments
LM User
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:
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).
Will Fulmer
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 ?
BrianG
OP@Stuart Weenigthanks for the feedback... turned out to be a file access issue.
LM User
Just checking: you've already familiarized yourself with the content here: https://www.logicmonitor.com/support/logicmodules/eventsources/types-of-events/log-file-monitoring?
LM User
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?