I am trying to setup Azure SQL database (cloud) into grafana (cloud) and after putting all required information (local host, database, server authentication) i am getting “Access Denied” error. I do know that my SQL database applies firewall check for every new IP that tries to connect to the database however i dont have any idea how should i allow grafana to access my database if security is the hurdle.
Usually i will enter client ip in Azure platform to allow certain ips to access my database. But in case of grafana i am not sure how to set this up. help would be appreciated.
Hey @smoizmasood - check the following doc to whitelist our IPs. That should do the trick.
Thanks a lot @daviddorman i tried one of the whitelist IP but it didn’t work. You probably mean i allow access to all IPs in this list ?
@smoizmasood yup, that’s right.
this morning I did include all the IPs in the list and database is connected now. Super Thanks !
Using Grafana Cloud Pro, I am having the same issue as @smoizmasood with connecting Data Source Type: Microsoft SQL Server to my existing Azure SQL Server. I added the whitelist IPs based on the suggestion by @daviddorman but am still receiving the ‘Access Denied’ error.
Link below is where I pulled the IPs from. I added both the hosted grafana and hosted metric IPs.
https://grafana.com/docs/grafana-cloud/reference/allow-list/
Is there another reason why I could be seeing the ‘Access Denied’ error?
Hi @alexela, can you confirm the SQL account you are using has the right login permissions? I believe the data source defaults to using the SQL auth method. If that’s all correct, you might be able to see something in the SQL logs to dig deeper into the access denied error. If you would like to share those, I can help with the review.
SOLVED
@aaronshifflett your thinking was correct and thank you for offering to help further. I had some help here figuring out the issue. A person here with fresh eyes noticed I did not have the correct option for encryption selected.
To pick the required information for the Data Source Type: Microsoft SQL Server configuration fields in Grafana, it was helpful for me to look at the connection strings for my Azure SQL database. This was where we noticed the SQL Database was encrypted.
encrypt=true
Access the connection strings: