mongodbelasticsearchgeolocationgeopointsgeohashing

How can I convert geopoint data of mongoDB to Elasticsearch 7.x in this case?


I want to convert geo data of mongodb to elasticsearch 7.x in realtime. I just know that should to use logstash-input-mongodb plugin of logstash.

Please, let me know how can I make logstash.conf refer to below.

I have a mongodb data like :

(some fields were encrypted. using GibberishAES.size(256) with custom string key.)

{
"id" : "john",
"age" : 26,
"geo" : "Cdzv5OoMXFw89do5NUorGkiRzAtnIpIw66kg=", // "57.233, 129.11"
"address" : "I6LoxOQPRPF7h4SLQo2g=" // "Rovert Hall"
}

To elasticsearch data like :

{
"id" : "john",
"age" : 26,
"geo" : "drm3bt", // geohash data of "57.233, 129.11"
"address" : "Rovert Hall"
}

Solution

  • I solved it as made mongodb oplog sender.

    read mongodb oplog with encoding data and then send it with decoding to logstash.

    if someone find solution, you can find it in below :

    Here : https://github.com/gnokoheat/oplog