Use the Generic Parser
Oracle Log Analytics lets you configure a generic parser to parse logs from different log sources.
This is particularly helpful when you’re not sure about how to parse your logs or how to write regular expressions to parse your logs, and you just want to pass the raw log data to perform analysis. Typically, a parser defines how the fields are extracted from a log entry for a given type of log file. However, the generic parser in Log Analytics can:
-
Detect the time stamp and the time zone from log entries.
-
Create a time stamp using the current time if the log entries don’t have any time stamp.
-
Detect whether the log entries are multiple lined or single lined.
-
Time stamp:
-
When a log entry doesn’t have a time stamp, then the generic parser creates and displays the time stamp based on the time when the log data was collected.
-
When a log entry contains a time stamp, but the time zone isn’t defined, then the generic parser uses the cloud agent’s time zone.
-
-
Time zone:
-
When a log file has log entries with multiple time zones, the generic parser can support up to 11 time zones.
-
When a log displays some entries with a time zone and some without a time zone, then the generic parser follows the time zone of the latest log entry.
If the time zone or the time zone offset is not indicated in the log events, then Oracle Log Analytics compares the last modified time of the OS with the timestamp of the last log entry to determine the proper time zone.
-
-
Multiple lines: When a log entry spans multiple lines, the generic parser can captures the multiline content correctly.