Configuring LogSources for Log Files

Last updated on 28 March, 2023

LogSources is a LogicModule that provide templates to help you enable LM Logs and configure log data collection and forwarding. LogSources contain details about which logs to get and where to get them, and which fields should be considered for parsing. LogSources is available for common sources of log data. The following describes how to set up LogSources for log files.

Requirements

The Log Files logsource type uses the LM OpenTelemetry Collector (LM OTEL Collector) to forward traces from your instrumented applications to the LogicMonitor platform. For more information see OpenTelemetry Collector for LogicMonitor Overview.

Configuration Options

The following describes configuration options specific to the Log Files type of logsource. For information on how to add a logsource, see Creating LogSources.

General Information

Provide the path name for the log file in XML format in the Log File Path field (required). 

Include Filters

You can add filters to include resources of certain types, for example an application. The output matching the filter criteria will be forwarded to the log ingestion process.

Available parameters

AttributesComparison operatorValue example
MessageRegexMatch, RegexNotMatch.Regular expression

Log Fields/Tags

You can configure Log Fields/Tags to send additional metadata with the logs.

Available parameters

MethodKey example Value exampleDescription
StaticFor example “Customer”For example “Customer_XYZ”
Dynamic(REGEX)For example “Host”For example “host=*”The query will run on the message field.
LM Property(Token)For example “Device”For example “##system.deviceId##”

Example

Configuration example for a Log Files type of logsource.

General Information

  • Name: Log_File
  • Description: Data collection template for data from monitored log files. 
  • Type: LM Logs: Log Files
  • Group: Log Files
  • Log File Path: \\share\logfile.log
In This Article