Convert Epoch time to "yyyy/MM/dd HH:mm:ss.SSS"

I am receiving epoch time as input and would like to persist this in the following format "yyyy/MM/dd HH:mm:ss.SSS" in Elasticsearch. I am performing the following at present in logstash

date {
match => ["mydate", "UNIX_MS"]
target => "mydate"
}

This persist's the date in the following format "2017-01-28T18:08:08.064Z" but i need the format to be "2017/01/28 18:08:08.064"

How do i change this format?

Appreciate your input! Thanks

what is being used to view the data? If you are using Kibana, you can configure kibana to view the data in all sorts of various time formats.

i was using a specific format in my kibana mapping. Once i removed this format in kibana and only specified the datatype to be date, i was able to persist the data to elasticsearch using logstash. The date field saved in elasticsearch happens to be of the default type (UTC) .

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