Hi!
Seen a lot of topics about converting date from custom log's strings. None of them helped me.
I have a string like this for example:
2019-04-11 07:36:27.842 - 14292 Information Interceptor Organization protection refreshing was started: .
I had successfully extract date from it with Grok:
(?<mytimestamp>^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3})
But with date filter I cannot send it to target field @timestamp
Here is the filter:
filter {
grok {
match => { "message" => "(?<mytimestamp>^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3})" }
}
date {
locale => "eng-US-POSIX"
match => [ "mytimestamp", "yyyy-MM-dd HH:mm:ss.SSS" ]
timezone => "Europe/Moscow"
}
}
What am I doing wrong?
Elastic and logstash version 6.7.1