ne0x / grafana-windrose-panel

Wind Rose (d3) Panel Plugin for Grafana
https://weather.ksz.ch/grafana/dashboard/db/wind-rose-github
Other
6 stars 5 forks source link

Instructions for using within Grafana #2

Open zubenubi opened 6 years ago

zubenubi commented 6 years ago

It is not clear as to how I can use this plugin within grafana. I have cloned and added a Windrose panel, then added a windspeed and a wind direction query on the metrics tab but I am not seeing the data appearing in the windrose panel.

Would it be possible to share some instructions as to how to link data from my influxdb to the windrose plugin in grafana?

flopp999 commented 6 years ago

I can see the plugin in Grafana list but I cannot choose WindRose when I click ADD ROW. I have restarted Grafana. Download files from github today, version 1.1.1 adn Grafana 4.6.3.

zubenubi commented 6 years ago

Try refreshing your dashboard

flopp999 commented 6 years ago

It worked, thanks. In Edit for WindRose, Axes and Options is empty for me.

zubenubi commented 6 years ago

Also for me. I dont know how to resolve that. I also dont know if those are the options that are missing. If I look at the console in chrome, there are a number of errors, so I suspect this is what the author is referring to wrt it being unstable.

zubenubi commented 6 years ago

This is what I am seeing in chrome. Seems like the code is looking for files that are not where they are expected to be: image

flopp999 commented 6 years ago

I also just found that. I am trying to change in js-file, will get back here soon with results

zubenubi commented 6 years ago

How did you install the plugin and what kind of machine are you using?

flopp999 commented 6 years ago

I copied a zip file from github and unzip it under plugins. I am using Debian 9

zubenubi commented 6 years ago

Same installation process here. Im on a raspberry pi with debian (stretch)

flopp999 commented 6 years ago

I have not solved the problem, but I think some files are in wrong location

zubenubi commented 6 years ago

Or perhaps there are hard-coded paths that are incorrect for the installation location

flopp999 commented 6 years ago

YEAH i found it. be sure that the plugin is installed as n-wind-rose-panel Open /var/lib/grafana/plugins/n-wind-rose-panel/dist/plugin.json change id to n-wind-rose-panel. Restart Grafana server

zubenubi commented 6 years ago

Nice! So now I am seeing content in the Axes and Options tabs. Are you using influxdb? Im not sure how the data queried from influxdb is connected to the windrose? Any insight?

flopp999 commented 6 years ago

Yes, Influxdb, but I cannot see any data. I need to found out how the data is read by the plugin. I have no knowledge about programming so I guess it can take a while :)

zubenubi commented 6 years ago

I think its got to be more along the lines of the change you just found in plugin.json. I am still seeing 404 errors for the .svg file: image

Are you able to see your data in a standard timeseries graph? I am. So I am quite confident that the issue with using the windrose plugin is related to these errors/inconsistencies between n-wind-rose-panel and ksz-wind-rose-panel

flopp999 commented 6 years ago

I got it working now see attached picture windrose

zubenubi commented 6 years ago

So I mimic'd your setup and got it working:

image

Does that mean that that the aliases ([direction] and [speed_main]) are what the plugin is using to link to the data elements?

flopp999 commented 6 years ago

Yes, I believe so. I will to through the code and try to find what names you can use.

flopp999 commented 6 years ago

You can use these names [direction] [speed_main] [speed_min] [speed_max] [speed_avg]

redge76 commented 6 years ago

Thanks everyone I was able to make this plugin work with you input. To sumarize:

  1. install the plugin in a directory called "n-wind-rose-panel"
  2. edit the file n-wind-rose-panel/dist/plugin.json and change the value ID to "n-wind-rose-panel".
  3. edit the file n-wind-rose-panel/src/plugin.json and change the value ID to "n-wind-rose-panel".
  4. restart grafana
  5. create a dashboard and add a "WindRose" panel
  6. create 2 metrics. First one is the wind direction data second is the wind speed. Use the ALIAS BY: "[direction]" for the first one and "[speed_main]" for the second one.

(this seems to indicate there is some mixup with dist and src)

wcndave commented 6 years ago

Thanks for your instructions. I am using MySQL and have the following for A and B respc.

SELECT dateTime as time_sec, windDir as direction, 'direction' as metric FROM archive WHERE $__unixEpochFilter(dateTime) ORDER BY dateTime ASC

SELECT dateTime as time_sec, windSpeed as speed_main, 'speed_main' as metric FROM archive WHERE $__unixEpochFilter(dateTime) ORDER BY dateTime ASC

But, I am not getting anything displayed....

Any ideas?

geoffbrowne commented 4 years ago

I realise this topic is a little dated now, but I am having a similar problem and you asked for feedback if any suspected bugs found... Grafana with prometheus, all running fine. Tried to use the windrose, but cant seem to feed it the correct data. In the db I have windspeed as 'windspd' and direction as 'winddir'. These display fine in a normal graph but when I try to use with the windrose, I get the display, but no data is shown.

Could you please tell me where I configure the Windrose plugin to use these metric names ?

Many thanks!

ahpigsy commented 4 years ago

So I've followed the direction on here and I get the following error. I'm using Grafana 7.3. Any help would be appreciated. Error loading: n-wind-rose-panel

zubenubi commented 4 years ago

I am also using grafana 7.3 and the panel gives me the same error. I believe it is related to the fact that the plugin is not 'signed'.

If it is possible, I would be happy to take on the maintenance of this project including signing the code if that is what it will take to get this plugin to be functional again in a current grafana. Please let me know

zubenubi commented 4 years ago

If I open the debug panel in Chrome, this is what I am shown: rror loading panel plugin: n-wind-rose-panel SyntaxError: Unexpected token '<' at eval (<anonymous>) at le (vendors~app.edf84a22bd8d77893179.js:2) ...

d00m178 commented 3 years ago

any updates for supporting v7?