Replace @timestamp or add new field with time from log file

I found solution from below link:

https://discuss.elastic.co/t/logstash-cannot-assign-correct-date-to-log-timestamp/89249/7?u=pashang

and I used below filter:

filter {
grok { match => {"message" => "(?[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3})"} }
ruby { code => 'event.set("currentDate", Time.now.strftime("%Y.%m.%d"))' }
ruby { code => 'event.set("logTimestamp", event.get("currentDate") + " " + event.get("logTime"))' }
date { match => ["logTimestamp", "YYYY.MM.dd HH:mm:ss.SSS"] }
}

thanks every one :slight_smile: