I currently have a field called time which has a the time my file was created in this format: dd-MM-yyyy_HHmmss. I would like to change the @timestamp to be the the time of file creation(time from my time field) instead of time it was read into logstash.
This is my date filter
date
{
match => [ "Time" , "dd-MM-yyyy_HHmmss" ]
target => "@timestamp"
}
I get a dateparsefailure. How do I get the date filter to change the timestamp not only to my new time but also convert the format something different?
What does the [Time] field look like if you use this?
output { stdout { codec => rubydebug { } } }
In elasticsearch timestamps are stored as the number of milliseconds since the epoch. You can change the display format in Kibana. If you want to store a different string format you can use ruby.
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.