10-09-2019 07:06 PM
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.
10-10-2019 06:16 AM
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"}10-09-2019 07:40 PM
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 ''
10-10-2019 06:16 AM
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"}10-09-2019 09:25 PM
Hi @farrukhaziz
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
10-10-2019 06:00 AM
actual it is Cisco test lab no need to worry
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide