Logstash regex pattern issue

71 views Asked by At

I have sample plain text:

..done, Total time: 10, Errors: 5, there is some text here Results:, , Total time: 10, Errors: 5, , [INFO]...

I am trying to parse values of Total time and Errors fields in Logstash grok filter with the following pattern:

grok {
  match => {"message" => ".*Total\stime\:\s(?<time>\d*).*Errors\:\s(?<errors>\d*)"}
}

But it assigns two values to every field:

Total time 10, 10

Errors 5, 5;

Is there any way to parse the values of those fields correctly, with one value only?

0

There are 0 answers