Nested Json fields

I have a json that looks like this

This is my problem:

I need to get positions of gateways (antennaLongitude, antennaLatitude) as a geo_point type
and make a kibana map that contains the posititions of gateways. But the field gateways is nested and contains many gateways[0..n] how can I get these geopoints in elasticsearch!? I did split() in logstash but split will multiply the hole document n times (n is number of gateways ) which is not correct for my case.

Can I index these positions as an array of geo_points ? 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.

I explained more my problem: I need how to index this nested json document how can I do it ?

I can't help without an example to start with I'm afraid.

Hi, I have the same question as @chrigui94 . For example, I have this json file and would like to use filebeat to parse and send to kibana.

JSON File
{
"payload": [
{
"measurement": "addition",
"fields": {
"eia": 487.86
},
"tags": {
"device": "xyz",
"catchall": "catchAll1",
"technology": "java",
"mbusprimary": 1
},
"timestamp": 1523446306000000000
}
],
"_msgid": "9600a72.8d0d458"
}

FileBeat.yml

  • type: log

    enabled: true

    paths:

    • C:\logs2*.json
      #json.keys_under_root: true
      #json.add_error_key: true
      processors:
    • decode_json_fields:
      fields: ["payload","measurement","eia","tags"]
      process_array: true
      max_depth: 3
      output.console.pretty: true

Please guide me how to parse this json payload and use in Kibana

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