gbrian / grafana-simple-sql-datasource

Grafana SQL datasource
MIT License
62 stars 20 forks source link

Bad Gateway Error #1

Closed aruneral01 closed 7 years ago

aruneral01 commented 7 years ago

Hi Gustavo

I am getting an error below when i am connecting Grafana to a MSQL2016 Instance thru the grafana-simple-sql-datasource plugin . Can you please alert me how to progress.

Error {"data":"","status":502,"config":{"method":"POST","transformRequest":[null],"transformResponse":[null],"jsonpCallbackParam":"callback","url":"api/datasources/proxy/1","data":{"type":"test","body":null,"url":null},"retry":0,"headers":{"X-Grafana-Org-Id":1,"Accept":"application/json, text/plain, /","Content-Type":"application/json;charset=utf-8"}},"statusText":"Bad Gateway"}

Thanks again for prompt response

arun

gbrian commented 7 years ago

Hi @aruneral01,

Updated the serverside script so you can check using your browser. Run serverside script: node sqlproxyserver.js Test on your browser navigating to http://myserver:port/?con=mssql://user:name@server/database you must get a {"status":"sucess"} response.

Found and old issue in Grafana, https://github.com/grafana/grafana/issues/6790 please be sure to be using latest Grafana version.

I've updated documentation: https://github.com/gbrian/grafana-simple-sql-datasource/blob/master/README.md

Hope this helps.

gbrian commented 7 years ago

@aruneral01 any update?

gbrian commented 7 years ago

@aruneral01 , Fixed! Finally found thet grafana was removing the "query string" part of the url when proxied. Please download latest version and fix the url on the datasource by removing the "?" separator, should be enough.

image