Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Logstash grok pattern for space field

Hi How to write a grok expression for the below log

[2017-03-25T00:00:07,137][WARN ]

match => { "message" => "\[%{TIMESTAMP_ISO8601:timestamp}/]/[%{LOGLEVEL:log-level}\s*\]" }

Is this correct , how to write space in grok ? Thanks

like image 262
user6826691 Avatar asked Mar 27 '17 00:03

user6826691


1 Answers

%{SPACE} is that pattern that matches 0 or more spaces, which is very useful if you don't know (or care!) if there will be a space or not.

like image 102
fylie Avatar answered Sep 29 '22 19:09

fylie