Hi,
To Monitor a application through logstash, i need to change format of data field from YYYY-MM-DD (2018-05-19) to DD/MMM/YYYY (19/May/2018) please suggest how to achive it.
Hi,
To Monitor a application through logstash, i need to change format of data field from YYYY-MM-DD (2018-05-19) to DD/MMM/YYYY (19/May/2018) please suggest how to achive it.
mutate { add_field => { "[date1]" => "2018-05-19" } }
ruby { code => "event.set('date2', Date.strptime(event.get('[date1]'), '%Y-%m-%d').strftime('%d/%b/%Y'))" }
does it. Error handling left as an exercise for the reader.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
© 2020. All Rights Reserved - Elasticsearch
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.