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

Popular posts from this blog

jQuery Mobile app not scrolling in Firefox -

c++ - How to add Crypto++ library to Qt project -

php array slice every 2th rule -