How to use the date filter plugin in logstash

Please find the below format of the date:


my config
date {
match => [ "time", "ISO8601" ]

but it giving the data parser error
what is the format of the above date
any one help me out

When I run logstash with

input { generator { count => 1 lines => [ '2022-04-12T05:11:47' ] } }
filter { date { match => [ "message", "ISO8601" ] } }
output { stdout { codec => rubydebug { metadata => false } } }

I get

"@timestamp" => 2022-04-12T09:11:47Z

So it is parsed correctly. Note that if there is anything else in your [time] field (including whitespace) it has to be in the pattern for the date filter. You cannot match against a sub-string of a field.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.