How to access Azure SQL Server Database Tables from Grafana Cloud

Alex 1 Reputation point
2021-07-06T05:41:59.96+00:00

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 Database
Azure Data Explorer
Azure Data Explorer
An Azure data analytics service for real-time analysis on large volumes of data streaming from sources including applications, websites, and internet of things devices.
502 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Sander van de Velde | MVP 30,786 Reputation points MVP
    2021-07-06T12:24:19.69+00:00

    Hello @Alex ,

    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.

    0 comments No comments