Open krisATelastic opened 5 years ago
That is expected. add_field is one of the common options ("decoration") that is performed when a filter has successfully executed. Also, the date filter is a no-op if the field to be matched does not exist. So the filter does not successfully match the field, so it does not add_field you are asking it to match.
{"date":"19/04/25","time":"10:20:34.443879"}
logtimestamp
field to simplify building a field to match the datestamp using a single filter call.The same add_field configuration works when using mutate instead no problems, but figured i'd report this for consistency.
filter { mutate { add_field => { "logtimestamp" => "%{[date]} %{[time]}" } } date { match => [ "logtimestamp", "dd/MM/yy HH:mm:ss.SSSSSS" ] } }
output { stdout {} }
{ "@timestamp" => 2025-04-19T00:20:34.443Z, "host" => "lstest", "date" => "19/04/25", "time" => "10:20:34.443879", "@version" => "1", "logtimestamp" => "19/04/25 10:20:34.443879" }