Hello everyone,
I’m really struggling trying to add geoip into my data. I am using python client to upload the log.
I have a dataset includes src_ip and dst_ip, I want them to be geoip then I can use the dashboard to visualize the location.
I tried to create a mapping for them.
mappings = {
“properties”: {
“SrC_IP”: {
“type”: “geo_point”
}
}
}
But when I try to upload the logs, It gave me an error.
File “/usr/local/lib/python3.8/dist-packages/opensearchpy/connection/base.py”, line 330, in _raise_error
raise HTTP_EXCEPTIONS.get(status_code, TransportError)(
opensearchpy.exceptions.RequestError: RequestError(400, ‘mapper_parsing_exception’, ‘unsupported symbol [.] in geohash [158.106.15.222]’)
I know how to add geoip when using logstash, but i don’t know how to add the geoip when using python client.
Can someone help me?