How can i extract timestamp from my log in logstash

Below is the format of my logs

05-08-2022 13:20:13,468 INFO  [stdout] ( Subject: Products Offer exceeded threshold limit of 10%

I want to extract the timestamp from this log and store it in a new field so for the above given log new timestamp field should have value "05-08-2022 13:20:13,468".
can anyone suggest any way to do this ?

Use a dissect filter

dissect { mapping => { "message" => "%{newField} %{+newField} %{}" } }

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