question

Alex-0278 avatar image
0 Votes"
Alex-0278 asked HimanshuSinha-MSFT commented

How to access Azure SQL Server Database Tables from Grafana Cloud

Hello,

I have an existing Azure SQL Server that contains a Database with multiple tables of information from IoT devices. I am actively trying link Grafana to this existing Azure SQL Server using the plugins available for Grafana.

There are 3 plugins I have tried. Listed below. I have listed them in order of most promising (#1) to least (#3). I have exhausted my search engine skills for each of the plugins. I only need one of them to work.

(1) Azure Data Explorer
grafana-azure-data-explorer-datasource

What I tried: I was successful in linking an Azure Data Explorer Cluster with Grafana but am not able to connect the azure data explorer cluster to my existing azure sql database. I set up a data explorer cluster and created a new database in the cluster. To test the plugin, I exported a .csv file of one of the existing tables in the existing database in my existing Azure SQL Server and ingested this .csv into the newly created database in my newly created data explorer cluster. I can access the information from the ingested .csv file through Grafana and perform queries.

Next Step: I need to link the newly created data explorer cluster to my existing azure sql database so that it will automatically update and I don't have to export then ingest a .csv file. Are there any resources available that would show me how best to go about this?


(2) Microsoft SQL Server
https://grafana.com/docs/grafana/latest/datasources/mssql/

What I tried: I cannot get the plugin to successfully access the existing Azure SQL Server. I keep getting 'access denied' errors in grafana. I have tried everything I can think of to enter into the plugin configuration fields but have not had any luck. I recieved the Grafana error logs from their technical support and they state the following:

  2021-07-05 22:46:32
  t=2021-07-05T22:46:32+0000 lvl=warn msg="not continuing query without cache due to error..." logger=cache.middleware error="error parsing time range for cache query: strconv.ParseInt: parsing \"now\": invalid syntax"
  2021-07-05 22:46:32
  t=2021-07-05T22:46:32+0000 lvl=eror msg="Access denied" logger=context userId=4 orgId=1 uname=alexela error="parse \"http://techwinegrenade.onmicrosoft.com\\\**winegrenade.database.windows.net\": invalid character \"\\\\\" in host name"** remote_addr=60.234.99.16
  2021-07-05 22:46:32
  t=2021-07-05T22:46:32+0000 lvl=eror msg="error processing cache middleware" logger=cache.middleware error="error parsing time range for cache query: strconv.ParseInt: parsing \"now\": invalid syntax"

I was told by the Grafana support that the error is with the host field and that the field needs to be a port number only. The only port number I can find associated with the existing Azure SQL Server is '1433'. I have tried this as well.

Next Step: I need to figure out what to enter into the plugin configuration fields. Attached image shows the fields. I am actively working this with the Grafana technical support. If there was a resource that could help, then please share. How do I identify the port for my existing Azure SQL Database as well as the DOMAIN?


(3) Azure Monitor
grafana-azure-monitor-datasource

What I tried: I was successful in setting up this plugin but unfortunately it only allows me to access metrics associated with the server performance. This is not what I need.

Next Step: nothing



I am lost as to what to try next. Any thoughts or direction on where to look next would be greatly appreciated.

Alex

111976-access-denied.jpg




azure-sql-databaseazure-data-explorer
access-denied.jpg (56.0 KiB)
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello @Alex-0278 ,
We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet .In case if you have any resolution please do share that same with the community as it can be helpful to others . Otherwise, will respond back with the more details and we will try to help .
@SandervandeVelde42 : Thaks for the help here .

Thanks
Himanshu

0 Votes 0 ·

Hello @Alex-0278 ,
We haven’t heard from you on the last response yet and was just checking back to see if you have a resolution yet .In case if you have any resolution please do share that same with the community as it can be helpful to others . Otherwise, will respond back with the more details and we will try to help .
.

Thanks
Himanshu

0 Votes 0 ·

1 Answer

SandervandeVelde42 avatar image
0 Votes"
SandervandeVelde42 answered

Hello @Alex-0278,

a few weeks ago, I checked out Grafana (running in a VM) together with SQL Azure. See my blog post for details.

Double-check the SQL Azure database server firewall rules.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.