Grok_filter pattern for different types of log events in a single log file


(mouchili) #1

I had a log file in which some patterns is of one kind and some others are of another kind for suppose

20-Sep-2017 11:17:32.257 WARNING [http-nio-8080-exec-405]
2017-09-20 11:17:34,370 http-nio-8080-exec-334 WARN

How to write a universal grok pattern to match these log patterns in a single log file.

Note: The column itself is not existing please help


(Magnus B├Ąck) #2

How to write a universal grok pattern to match these log patterns in a single log file.

You can either

  • use conditionals based on a field that indicates the type of the log to choose between completely different filters (useful for doing different things with different kinds of logs) or
  • use multiple grok expressions in the same grok filter (useful when you have the same kind of logs in slightly different formats).

Note: The column itself is not existing please help

I have no idea what you mean by this.


(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.