Hello,
I have had csv files for a long time parsing correctly, but something changed and I get the error below.
My "run_date" is a simple field that looks like this in the data files: "2017-12-28"
It always worked. I mutated it like this, never had a problem.
date {
match => [ "run_date", "yyyy-MM-dd" ]
}
My data csv files changed, got added columns, but nothing relevant to this problem has changed.
The main change is the upgrade to ELK 6.X but maybe it's just a coincidence.
Below is the error log related to this post, and I cannot understand the problem from the log.
Any advice greatly appreciated.
[2018-01-10T16:17:22,977][WARN ][logstash.outputs.elasticsearch] Could not index event to Elasticsearch. {:status=>400, :action=>["index", {:_id=>"c6f45790ab274ac98083dec77711f6d9f8d19496", :_index=>"company_test", :_type=>"doc", :_routing=>nil}, #<LogStash::Event:0x4e24f933>], :response=>{"index"=>{"_index"=>"company_test", "_type"=>"doc", "_id"=>"c6f45790ab274ac98083dec77711f6d9f8d19496", "status"=>400, "error"=>{"type"=>"mapper_parsing_exception", "reason"=>"failed to parse [run_date]", "caused_by"=>{"type"=>"illegal_argument_exception", "reason"=>"Invalid format: \"run_date\""}}}}}
I always had a conf line that drops the header. The drop runs before the date clause.
It always worked, and my conf file never changed, my data never changed
The only thing that changed to my knowledge is the logstash version.
If I am wrong in the above assumptions - can you suggest a debug option that will show the value of run_date and information on the specific csv file with the bad input?
If I am wrong in the above assumptions - can you suggest a debug option that will show the value of run_date and information on the specific csv file with the bad input?
You could e.g. temporarily replace the elasticsearch output with a stdout { codec => elasticsearch } output so that Logstash dumps the raw events into its log.
I did that, it looked as expected. yyyy-MM-dd.
I am guessing that the records that raise this error don't show up on stdout, do they?
My goal is to find them, maybe understand if there is a difference.
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.