I have a logstash script that reads log and output to elasticsearch
Logstash vesion: 2.2.2
Elasticsearch: 2.3.4
It runs and display fine when
stdout { codec => rubydebug }
is enabled.
when I only enable
elasticsearch {
index => "logstash-myindexname-%{@index}"
hosts => "192.168.22.112:9200"
}
I keep getting this exception
response=>{"create"=>{"_index"=>"myindexname-2016-11-13", "_type"=>"cisco", "_id"=>"AVhnLEE0NsFvfd8lLGSi", "status"=>400, "error"=>{"type"=>"mapper_parsing_exception", "reason"=>"failed to parse", "caused_by"=>{"type"=>"illegal_state_exception", "reason"=>"Mixing up field types: class org.elasticsearch.index.mapper.core.StringFieldMapper$StringFieldType != class org.elasticsearch.index.mapper.internal.IndexFieldMapper$IndexFieldType on field _index"}}}}, :level=>:warn}←[0m
What is wrong here? I cannot find the problem at all.