hi all, I am using fluent-bit to feed data into ES. I have the GeoIP processor "activated". My index mapping is here. The Geo IP processor is doing it's job correctly, but on the ES side, I am getting this error:
{"type": "server", "timestamp": "2019-05-14T04:34:01,014+0000", "level": "DEBUG", "component": "o.e.a.b.TransportShardBulkAction", "cluster.name": "docker-cluster", "node.name": "ip-192-168-12-243.ap-southeast-2.compute.internal", "cluster.uuid": "H4SUXuGIQhWcMqL3hYBoKA", "node.id": "mhSlcK1gRNaKEnxM74agMg", "message": "[nginx_geoip][0] failed to execute bulk item (index) index {[nginx_geoip][flb_type][5XietGoBOBIN2Y3DZtOt], source[{\"remote_addr\":\"127.0.0.1\",\"request\":\"GET / HTTP/1.1\",\"real_ip\":\"8.8.8.8\",\"geoip\":{\"continent_name\":\"North America\",\"country_iso_code\":\"US\",\"location\":{\"lon\":-97.822,\"lat\":37.751}},\"response_status\":\"200\",\"body_bytes_sent\":\"12\",\"time_local\":\"14/May/2019:04:33:45 +0000\",\"request_method\":\"GET\",\"http_user_agent\":\"curl/7.29.0\",\"remote_user\":\"\",\"@timestamp\":\"2019-05-14T04:33:45.455Z\",\"request_time\":\"0.000\",\"http_referrer\":\"\"}]}" ,
"stacktrace": ["java.lang.IllegalArgumentException: mapper [geoip.location] of different type, current_type [geo_point], merged_type [ObjectMapper]",
To reproduce:
Create ES docker container:
sudo docker run --network=host -d -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:7.0.1
Setup processor:
curl -X PUT "localhost:9200/_ingest/pipeline/geoip" -H 'Content-Type: application/json' -d'
{
"description" : "Add geoip info",
"processors" : [
{
"geoip" : {
"field" : "real_ip"
}
}
]
}
Create the index with settings above:
curl -H 'Content-Type: application/json' -XPUT "http://elasticsearch:9200/nginx_geoip" -d '
{mapping}
'
Try to ingest a document:
curl -H 'Content-Type: application/json' -XPOST 'http://localhost:9200/nginx_geoip/metrics?pipeline=geoip' -d '
{
"real_ip": "192.30.253.113",
"@timestamp":"2019-05-14T04:33:45.455Z"
}
'
{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"mapper [geoip.location] of different type, current_type [geo_point], merged_type [ObjectMapper]"}],"type":"illegal_argument_exception","reason":"mapper [geoip.location] of different type, current_type [geo_point], merged_type [ObjectMapper]"},"status":400}
Any thoughts on where I am going wrong?
Thanks for any help!