Set geoloacation variable type in json

I need to convert data type in logstash to send it to kibana , right now kibana recieve it like long type y want to convert into geolocation to use kibana´s map
i have this :

{
    "varname":[
        {
            "name": "Alpha", "locationB": [3.14159,2.8283] 
        },
        { 
            "name": "Beta","locationB": [3.14159,2.8283]
        },
        ...
    ]
}

I need how to know to get this in filebeat to use in kibana

You need to set an index template that tells elasticsearch it is a geo_point. See here.

if i do this all the index that have theese variable change the var type?

soo , I dont know how to do this , ... ;(

i got this

{
"error": {
"root_cause": [
{
"type": "resource_already_exists_exception",
"reason": "index [logstash-2019.10.18/WkbT-3mxRkW1avQz-WFQKQ] already exists",
"index_uuid": "WkbT-3mxRkW1avQz-WFQKQ",
"index": "logstash-2019.10.18"
}
],
"type": "resource_already_exists_exception",
"reason": "index [logstash-2019.10.18/WkbT-3mxRkW1avQz-WFQKQ] already exists",
"index_uuid": "WkbT-3mxRkW1avQz-WFQKQ",
"index": "logstash-2019.10.18"
},
"status": 400
}

doing this:

PUT logstash-2019.10.18
{
"mappings": {
"properties": {
"namex": {
"type": "geo_point"
}
}
}
}

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.