When indexing geoip data with logstash 5.0.0-alpha5, some exception occurred.
Error message:
MapperParsingException[failed to parse]; nested: ElasticsearchParseException[geo_point expected];
at org.elasticsearch.index.mapper.DocumentParser.wrapInMapperParsingException(DocumentParser.java:188)
at org.elasticsearch.index.mapper.DocumentParser.parseDocument(DocumentParser.java:82)
at org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:286)
at org.elasticsearch.index.shard.IndexShard.prepareIndex(IndexShard.java:511)
at org.elasticsearch.index.shard.IndexShard.prepareIndexOnPrimary(IndexShard.java:492)
geoip data inserted:
"dst_geoip": {
"timezone": "Asia/Seoul",
"ip": "2001:2d8:e22b:ba46:0:0:3191:ad",
"latitude": 36.5,
"continent_code": "AS",
"city_name": null,
"country_code2": "KR",
"country_name": "Republic of Korea",
"dma_code": null,
"country_code3": "KR",
"region_name": null,
"location": [127.75, 36.5],
"postal_code": null,
"longitude": 127.75,
"region_code": null
},
mapping:
"dst_geoip" : {
"dynamic" : false,
"properties" : {
"area_code":{"type":"long"},
"city_name":{"type":"text", "index":"not_analyzed"},
"asn":{"type":"text", "index":"not_analyzed"},
"number":{"type":"text", "index":"not_analyzed"},
"continent_code":{"type":"text"},
"coordinates":{"type":"text"},
"country_code2":{"type":"text"},
"country_code3":{"type":"text"},
"country_name":{"type":"text", "index":"not_analyzed"},
"dma_code":{"type":"long"},
"ip":{"type":"ip", "index":"not_analyzed"},
"latitude":{"type":"double"},
"longitude":{"type":"double"},
"postal_code":{"type":"text"},
"real_region_name":{"type":"text", "index":"not_analyzed"},
"region_name":{"type":"text", "index":"not_analyzed"},
"timezone":{"type":"text", "index":"not_analyzed"},
"location" : {
"type" : "geo_point"
}
},
"type" : "object"
}
What's wrong with my configuration?
If anyone knows, please let me know.
Thanks in advance.