I'm having trouble with some date parsing. The entry I'm getting doesn't have a year in the datestamp, so I'm trying to pull the year out of @timestamp, and then put the proper timestamp back into @timestamp.
The idea is to put the log values into gen_datetime, and then use that to move back into @timestamp.
The error I am getting is: "reason"=>"failed to parse [gen_datetime]", "caused_by"=>{"type"=>"illegal_argument_exception", "reason"=>"Invalid format: "2017-Mar-22 15:09:49" is malformed at "-Mar-22 15:09:49""}
To me, it looks right. Any clue on what I'm doing wrong?
It looks like Elasticsearch has mapped gen_datetime as a timestamp field but isn't able to parse "2017-Mar-22 15:09:49" as a timestamp. Since you probably don't want to keep that field anyway I suggest you add remove_field => ["gen_datetime"] to your date filter so that the field is deleted after a successful parsing operation.
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.