index pattern : s3-*
service.action.networkConnectionAction.remoteIpDetails.geoLocation.lat - type is number
service.action.networkConnectionAction.remoteIpDetails.geoLocation.lon - type is number
service.action.portProbeAction.portProbeDetails.remoteIpDetails.geoLocation.lat - type is number
service.action.portProbeAction.portProbeDetails.remoteIpDetails.geoLocation.lon - type is number
I am trying to plot a coordinated map using the above fields. However Kibana requires the fields to be of geo_point type. I tried using a template as below ( ES 7.1 )
Basically, I am using requests.post to create and load the json file to ES. If I execute the template API provided in my question, it creates the mapping as per the template. However, when the process is ran, it can't load the data into ES and fails with a 400 error. It seems to be failing because the json data contains many other fields and not just the "lon" and "lat" fields. Basically, I was using the fields as per the content of the json data in ES.
This is the python code snippet
headers = {'Content-type': 'application/json', 'Accept': 'text/plain'}
resp = requests.post(es_Url, auth=awsauth, headers=headers, json=docData)
In the above, the docData is basically the son load of the file content
docData = json.loads(line)
I don't have a clear understanding of what you are doing and how.
Could you provide a full recreation script as described in About the Elasticsearch category. It will help to better understand what you are doing. Please, try to keep the example as simple as possible.
A full reproduction script will help readers to understand, reproduce and if needed fix your problem. It will also most likely help to get a faster answer.
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.