I'm new to ELK stack. exploring logstash and elastic search for the last one week. I'm finding difficulties to convert a time stamp(default considered as string type) to date type field. This the string "Thu May 18 06:39:44 CEST 2017" represents timestamp in tool log wanted to convert this string to date field using logstash filter Date plugin. I don't know how to make it. Any suggestion or help would be appreciated. Thanks !
filter {
csv {
columns =>["Make","Color","Price","Sold"]
separator =>","
}
date
{
match => ["Sold", "DD-MM-YYYY"] # Not sure how to match timestamp in log file to convert to date type.
target => "Sold"
}
mutate{
convert => ["Price","float"]
}
}
//Let's assume My csv file contains the below logs. the last field for timestamp iPhone,silver,260,Thu Sep 07 11:05:07 CEST 2017
iPhone,gold,400,Thu Oct 07 12:05:07 CEST 2017
EEE MMM dd HH:mm:ss `CEST` yyyyI haven't tested it. Note that the EEE and MMM are locale-dependent. - baudsp