regex - Grepping rails log in logstash, greediness captures all requests -
i have such pattern in logstash multiline filter:
filter { multiline { pattern => "^started.*activerecord: ([0-9]+\.[0-9]{1})ms\).+?" negate => true => "previous" stream_identity => "%{host}.%{path}.%{type}" } }
but problem here expression captures rails requests, till end of log file. how tell expression stop @ first match?
try instead:
^started.*?activerecord: ([0-9]+\.[0-9]{1})ms\).*?$
Comments
Post a Comment