Closed lrosser2103 closed 4 years ago
Hey there,
Glad to hear you find it useful. :) We're working on some major behind the scenes work here that should hopefully make sense of this easier including update to React for Grafana7, but for now let's see if we can sort this out...
The links.endpoints.name attribute needs to map onto the "target" name coming out of your datasource. That's how it maps what piece of the data coming back to what section of the map. The "label" is just what gets displayed. I'm unfamiliar with the details of the SQL driver and how exactly to do that, but I suspect that is why you're not getting data aligned onto the map.
The other thing to make sure is that you have defined the min/max values for the layer. This is in the Map Editor options in the Editor, you might have to scroll to the right to see it since Grafana7 changed the way the editor gets laid out. Since the scale is based on a percentage, it has to know what the range is to color it correctly.
Hope any of that helps!
Dan
On Sep 20, 2020, at 4:14 PM, lrosser2103 notifications@github.com wrote:
Hello team,
I have been reading and working with plugin, and I must say, a powerful tool! I am having a bit of difficulty getting my data to come in properly so that the color coding will work. I know its intended to network throughput, but I was thinking I could adapt it for use in monitoring microwave links. When I hover over the endpoints, my values are displayed, but the plugin renders my query values as "down" and won't paint the link or endpoints the color in the spectrum or threshold modes. My question is to better understand the background calculations so that I can manipulate the output data from Influx to satisfy how the plugin operates. I am able to link data to my map source layer JSON, but massaging my query results into a color based layer for data visualization is perplexing me. Details below:
Grafana 7 not in a docker Ubuntu 20 latest pull from this repository for the globalnoc-networkmap-panel All installs completed without error.
Query: SELECT "genEquipRfuStatusRxLevel" *-1 FROM "genEquipRfuStatusTable" WHERE ("genEquipRfuStatusId" = '268451905') AND $timeFilter GROUP BY "agent_host"
Which yeilds an output from the link device as a negative value (dBm) from the microwave radio, which I flip to positive for this plugin with a *-1.
Map Source JSON: { "results": [ { "links": [ { "endpoints": [ { "name": "10.20.30.205", "label": "Ruffner" }, { "name": "10.20.30.68", "label": "Pilot Knob" } ], "path": [ { "lon": "-86.699440", "lat": "33.565345", "name": "10.20.30.205" }, { "lon": "-86.667503", "lat": "33.600121", "name": "10.20.30.68" } ], "name": "10.20.30.205" } ], "endpoints": [ { "lon": "-86.699440", "lat": "33.565345", "name": "10.20.30.205", "label": "Ruffner" }, { "lon": "-86.667503", "lat": "33.600121", "name": "10.20.30.68", "label": "Pilot Knob" } ] } ] }
Data from my query is: https://user-images.githubusercontent.com/58376503/93721207-eae5af80-fb53-11ea-821f-401342dc1078.PNG Object request:Object method:"GET" url:"api/datasources/proxy/1/query" params:Object db:"ptp820" q:"SELECT "genEquipRfuStatusRxLevel" *-1 FROM "genEquipRfuStatusTable" WHERE ("genEquipRfuStatusId" = '268451905') AND time >= now() - 6h GROUP BY "agent_host"" epoch:"ms" data:null precision:"ms" response:Object results:Array[1] 0:Object statement_id:0 series:Array[44] 0:Object name:"genEquipRfuStatusTable" tags:Object agent_host:"10.19.29.135" columns:Array[2] 0:"time" 1:"genEquipRfuStatusRxLevel" values:Array[179] 0:Array[1600611133000,36] 1:Array[1600611245000,36] 2:Array[1600611374000,36] 3:Array[1600611484000,36] 4:Array[1600611613000,36] 5:Array[1600611734000,36] 6:Array[1600611863000,36]
Thank you for any assistance. I'm sure I'm overlooking something or trying to make something work that wasn't designed to.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/GlobalNOC/globalnoc-networkmap-panel/issues/111, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABXF7JG7KUKKXQ632VQXYULSGZPD5ANCNFSM4RT2NPXA.
Dan,
Now I feel stupid....LOL. Sometimes I'm scared to ask because some people belittle us folks learning something new. I have the map running with my microwave link signal levels colored right, after setting min/max levels. I knew it was in a percentage scale, so I should have caught that. All I would add is the ability to select what units are being used, such as decibels per milliwatt dBm in my case. Love the plugin, and would be glad to help in any way if I can. I may not know how to write software, but I'm a pretty good planner and architect.
Thanks again!
Lee Rosser Wide Spectrum Technologies, LLC lrosser2103@gmail.com
Closing issue due to operator error.
No problem at all, happy to see that other people are getting use out of it. 👍 Glad to hear we got it all sorted out.
Hello team,
I have been reading and working with plugin, and I must say, a powerful tool! I am having a bit of difficulty getting my data to come in properly so that the color coding will work. I know its intended to network throughput, but I was thinking I could adapt it for use in monitoring microwave links. When I hover over the endpoints, my values are displayed, but the plugin renders my query values as "down" and won't paint the link or endpoints the color in the spectrum or threshold modes. My question is to better understand the background calculations so that I can manipulate the output data from Influx to satisfy how the plugin operates. I am able to link data to my map source layer JSON, but massaging my query results into a color based layer for data visualization is perplexing me. Details below:
Grafana 7 not in a docker Ubuntu 20 latest pull from this repository for the globalnoc-networkmap-panel All installs completed without error.
Query: SELECT "genEquipRfuStatusRxLevel" *-1 FROM "genEquipRfuStatusTable" WHERE ("genEquipRfuStatusId" = '268451905') AND $timeFilter GROUP BY "agent_host"
Which yeilds an output from the link device as a negative value (dBm) from the microwave radio, which I flip to positive for this plugin with a *-1.
Map Source JSON: { "results": [ { "links": [ { "endpoints": [ { "name": "10.20.30.205", "label": "Ruffner" }, { "name": "10.20.30.68", "label": "Pilot Knob" } ], "path": [ { "lon": "-86.699440", "lat": "33.565345", "name": "10.20.30.205" }, { "lon": "-86.667503", "lat": "33.600121", "name": "10.20.30.68" } ], "name": "10.20.30.205" } ], "endpoints": [ { "lon": "-86.699440", "lat": "33.565345", "name": "10.20.30.205", "label": "Ruffner" }, { "lon": "-86.667503", "lat": "33.600121", "name": "10.20.30.68", "label": "Pilot Knob" } ] } ] }
Data from my query is:
Object request:Object method:"GET" url:"api/datasources/proxy/1/query" params:Object db:"ptp820" q:"SELECT "genEquipRfuStatusRxLevel" *-1 FROM "genEquipRfuStatusTable" WHERE ("genEquipRfuStatusId" = '268451905') AND time >= now() - 6h GROUP BY "agent_host"" epoch:"ms" data:null precision:"ms" response:Object results:Array[1] 0:Object statement_id:0 series:Array[44] 0:Object name:"genEquipRfuStatusTable" tags:Object agent_host:"10.19.29.135" columns:Array[2] 0:"time" 1:"genEquipRfuStatusRxLevel" values:Array[179] 0:Array[1600611133000,36] 1:Array[1600611245000,36] 2:Array[1600611374000,36] 3:Array[1600611484000,36] 4:Array[1600611613000,36] 5:Array[1600611734000,36] 6:Array[1600611863000,36]
Thank you for any assistance. I'm sure I'm overlooking something or trying to make something work that wasn't designed to.