Open daarunraj opened 4 years ago
Please follow this link for an example map source.
Please note that results.links.endpoints
should be specified to associate data with each link.
Currently we are using Prometheus as datasource. Is it mandatory to use GlobalNOC TSDS Datasource for Network map or can we use Prometheus datsource?
How can we map data from datsource to network map through json editor? We are trying to add the results.links.endpoints in our json editor but still we are unable to get the dynamic values on the map. We had checked link given above for reference given to results.links.endpoints. Can you please explain how to use results.links.endpoints in the below example.
Example: { "results": [ { "links": [ { "path": [ { "lon": "-104.991531", "order": "50", "lat": "40.742043" }, { "lon": "-108.991531", "order": "50", "lat": "40.742043" }, { "lon": "-104.991531", "order": "10", "lat": "37.742043" } ], "name": "Link1" } ], "endpoints": [ { "pop_id": null, "lon": "-118.243683", "real_lon": null, "real_lat": null, "name": "Endpt1", "lat": "34.052235" }, { "pop_id": null, "lon": "-104.991531", "real_lon": null, "real_lat": null, "name": "Endpt2", "lat": "40.742043" }, { "pop_id": null, "lon": "-104.991531", "real_lon": null, "real_lat": null, "name": "Endpt3", "lat": "37.742043" } ] } ] }
As far as I've tested you can use any datasource. Grafana mandates a standard for what the data looks like so it shouldn't matter.
Eyeballing your JSON shown below, it looks like you're mixing up the results.endpoints with the results.links.endpoints, admittedly a bit of a name overload. The results.links.endpoints is used to control the association of data onto the map. You can see this in the README example. The name
attribute is what matches a target coming out of the datasource, if that makes sense.
I am able to mark the routers on the map and the link between them using the map source (json editor) option. I am trying to display the dynamic values(input rate) fetched from metric query on the map using legend when hovered over the link. But unable to find a way to do so. I tried passing the value in json editor, but couldn't get to see that on the map. Looking for help on displaying the dynamic values on the map. Thanks in advance. The metric query and legend used is: metric: ifHCInOctets legend: ipRate
Below is the json in the map source for marking the routers and link. { "results": [ { "links": [
{ "path": [ { "lon": "-150.991531", "lat": "40.742043" }, { "lon": "-150.991531", "lat": "70.742043" }
] }