Output generated from get_network_devices(network_id) API is below need to transform it to other format
{
"address": "",
"firmware": "switch-11-22",
"floorPlanId": null,
"lanIp": "192.168.128.42",
"lat": 37.4180951010362,
"lng": -122.098531723022,
"model": "MS220-8P",
"name": "Office Switch",
"switchProfileId": null
}
need to transform it into mapping for geo plotting in kibana
{ "mappings": { "_doc": { "properties": { "location": { "type": "geo_point" } } } } }
Solved! Go to solution.
for kibana the mapping information have to be in the formate below
{ "mappings": { "_doc": { "properties": { "location": { "type": "geo_point" } } } } }
and sample data look like this
{"index":{"_id":1}} {"location": "2.089330000000046,41.47367000000008", "city": "SantCugat"} {"index":{"_id":2}} {"location": "2.2947825000000677,41.601800991000076", "city": "Granollers"} {"index":{"_id":3}} {"location": "2.1105957495300474,41.5496295760424", "city": "Sabadell"} {"index":{"_id":4}} {"location": "2.132605678083895,41.5370461908878", "city": "Barbera"} {"index":{"_id":5}} {"location": "2.151270020052683,41.497779918345415", "city": "Cerdanyola"}
Could you be more precise on your question ?
1-What element from the output of the API do you need ?
2- Could you sample a complete ''geo plotting in kibana ''
for kibana the mapping information have to be in the formate below
{ "mappings": { "_doc": { "properties": { "location": { "type": "geo_point" } } } } }
and sample data look like this
{"index":{"_id":1}} {"location": "2.089330000000046,41.47367000000008", "city": "SantCugat"} {"index":{"_id":2}} {"location": "2.2947825000000677,41.601800991000076", "city": "Granollers"} {"index":{"_id":3}} {"location": "2.1105957495300474,41.5496295760424", "city": "Sabadell"} {"index":{"_id":4}} {"location": "2.132605678083895,41.5370461908878", "city": "Barbera"} {"index":{"_id":5}} {"location": "2.151270020052683,41.497779918345415", "city": "Cerdanyola"}
Hi @Farrukh
Some of the information in the JSON output you have provided is very sensitive, it is not a good idea to post it publicly as it could be used for malicious activity. Can you please mask out the serial number, network id, lat/lng of the device, please? This information is sensitive and it is always a good idea to protect them.
Cheers!
Raj
actual it is Cisco test lab no need to worry