gbrian / grafana-simple-sql-datasource

Grafana SQL datasource
MIT License
62 stars 20 forks source link

Add as datasource? #5

Closed TryTryAgain closed 7 years ago

TryTryAgain commented 7 years ago

I was expecting this to be project to add a datasource option, but I don't see instructions on how to add it to grafana. I've successfully connected via the sqlproxy included and the test connection string provided in the instructions, but I'm not sure how to add it to grafana. I tried using the Simple JSON datasource and plopping in my proxy:connection string with no success. What am I missing?

TryTryAgain commented 7 years ago

Sorry for my ignorance, got a bit further, I placed the simplesql git clone in /usr/share/grafana/public/app/plugins/datasource/

Then restarted grafana service and was able to select simplesql as a datasource...but, upon selecting, I'm getting in the upper right red error box containing:

Plugin Error (SystemJS) XHR error (404 Not Found) loading http://grafana.myinternalserver.net/public/app/plugins/datasource/grafana-simple-sql-datasource/module.js?bust=1499563160961 Error: XHR error (404 Not Found) loading http://grafana.myinternalserver.net/public/app/plugins/datasource/grafana-simple-sql-datasource/module.js?bust=1499563160961 Error loading http://grafana.myinternalserver.net/public/app/plugins/datasource/grafana-simple-sql-datasource/module.js

...and no options to add my proxy/connection string.

http://grafana.myinternalserver.net resolves, but http://grafana.myinternalserver.net/public/ does not and nothing after it is either...

I'm running Grafana 4.4.1 on Ubuntu from PPA. And apparently just having a hard time getting it in the right place?

Thanks for your help and great work!

TryTryAgain commented 7 years ago

Success, please disregard...maybe consider updating the install/config readme? It was simple once I knew what I was doing wrong. Found out via this issue... The path at which I needed to drop the git clone was in /var/lib/grafana/plugins/ rather than /usr/share/grafana/public/app/plugins/datasource/ ...live and learn. Thank you for this wonderful contribution, excited to play around with it!