title | description | author | ms.author | ms.service | ms.topic | ms.date |
---|---|---|---|---|---|---|
How to manage data sources for Azure Managed Grafana |
In this how-to guide, discover how you can add, configure and remove data sources for Azure Managed Grafana. |
maud-lv |
malev |
managed-grafana |
how-to |
12/08/2023 |
In this guide, you learn about data sources supported in each Azure Managed Grafana plan and learn how to add, manage and remove these data sources.
- An Azure Managed Grafana workspace.
- Required Grafana role: Grafana Editor.
By design, Grafana can be configured with multiple data sources. A data source is an externalized storage backend that holds telemetry information.
Azure Managed Grafana supports many popular data sources. The table below lists the Grafana core data sources that can be added to Azure Managed Grafana for each service tier.
Data sources | Essential (preview) | Standard |
---|---|---|
Alertmanager | - | ✔ |
AWS CloudWatch | - | ✔ |
Azure Data Explorer | - | ✔ |
Azure Monitor | ✔ | ✔ |
Elasticsearch | - | ✔ |
GitHub | - | ✔ |
Google Cloud Monitoring | - | ✔ |
Graphite | - | ✔ |
InfluxDB | - | ✔ |
Jaeger | - | ✔ |
JSON API | - | ✔ |
Loki | - | ✔ |
Microsoft SQL Server | - | ✔ |
MySQL | - | ✔ |
OpenTSDB | - | ✔ |
PostgreSQL | - | ✔ |
Prometheus | ✔ | ✔ |
Tempo | - | ✔ |
TestData | ✔ | ✔ |
Zipkin | - | ✔ |
Within the Standard service tier, users who have subscribed to the Grafana Enterprise option can also access the following data sources.
- AppDynamics
- Azure DevOps
- Databricks
- DataDog
- Dynatrace
- GitLab
- Honeycomb
- Jira
- Looker
- MongoDB
- New Relic
- Oracle Database
- Salesforce
- SAP HANA®
- ServiceNow
- Snowflake
- Splunk
- Splunk Infrastructure monitoring (SignalFx)
- Sqlyze Datasource
- Sumo Logic
- Wavefront
Customers with a Standard tier plan can access additional data sources from the Plugin management (preview) feature.
For more information about data sources, go to Data sources on the Grafana Labs website.
To add a data source to Azure Managed Grafana, follow the steps below.
-
Core Grafana plugins are installed in your workspace by default. If you want to use another type of data source, you first need to install its plugin. To install a new data source plugin, follow the instructions available at Add a plugin.
-
Add the data source to your instance.
- Open your Azure Managed Grafana workspace in the Azure portal and go to Overview > Endpoint to open the Grafana UI.
- In the Grafana portal, deploy the menu on the left and select Connections > Data sources > Add new data source.
- Select a data source from the list. The data source is added to your instance.
- Fill out the required fields and select Save & test to update the data source configuration and make sure it works.
:::image type="content" source="media/data-sources/add-data-source.png" alt-text="Screenshot of the Add data source page in Grafana.":::
Run the az grafana data-source create command to add a Grafana core data source with the Azure CLI.
For example, to add an Azure SQL data source, run:
az grafana data-source create --name <instance-name> --definition '{
"access": "proxy",
"database": "testdb",
"jsonData": {
"authenticationType": "SQL Server Authentication",
"encrypt": "false"
},
"secureJsonData": {
"password": "verySecretPassword"
},
"name": "Microsoft SQL Server",
"type": "mssql",
"url": "<url>",
"user": "<user>"
}'
Tip
If you can't connect to a data source, you may need to modify access permissions to allow access from your Azure Managed Grafana instance.
The content below shows how to configure some of the most popular data sources in Azure Managed Grafana: Azure Monitor and Azure Data Explorer. A similar process can be used to configure other types of data sources. For more information about a specific data source, refer to Grafana's documentation.
The Azure Monitor data source is automatically added to all new Managed Grafana resources. To review or modify its configuration, follow the steps below in the Grafana portal of your Azure Managed Grafana instance or in the Azure CLI.
-
Deploy the menu on the left and select Connections > Data sources.
:::image type="content" source="media/data-sources/configuration.png" alt-text="Screenshot of the Add data sources page.":::
-
Azure Monitor is listed as a built-in data source for your Managed Grafana instance. Select Azure Monitor.
-
In the Settings tab, authenticate through Managed Identity and select your subscription from the dropdown list or enter your App Registration details
:::image type="content" source="media/data-sources/configure-Azure-Monitor.png" alt-text="Screenshot of the Azure Monitor page in data sources.":::
Authentication and authorization are made through the provided managed identity. Using managed identity, lets you assign permissions for your Managed Grafana instance to access Azure Monitor data without having to manually manage service principals in Microsoft Entra ID.
Run the az grafana data-source update command to update the configuration of your Azure Monitor data sources using the Azure CLI.
For example:
az grafana data-source update --data-source 'Azure Monitor' --name <instance-name> --definition '{
"datasource": {
"access": "proxy",
"basicAuth": false,
"basicAuthUser": "",
"database": "",
"id": 1,
"isDefault": false,
"jsonData": {
"azureAuthType": "msi",
"subscriptionId": "<subscription-ID>"
},
"name": "Azure Monitor",
"orgId": 1,
"readOnly": false,
"secureJsonFields": {},
"type": "grafana-azure-monitor-datasource",
"typeLogoUrl": "",
"uid": "azure-monitor-oob",
"url": "",
"user": "",
"version": 1,
"withCredentials": false
},
"id": 1,
"message": "Datasource updated",
"name": "Azure Monitor"
}
Note
User-assigned managed identity isn't currently supported.
To learn how to configure Azure Data Explorer, go to Configure Azure Data Explorer.
This section describes the steps for removing a data source.
Caution
Removing a data source that is used in a dashboard will make the dashboard unable to collect the corresponding data and will trigger an error or result in no data being shown in the panel.
Remove a data source in the Azure portal:
- Open your Azure Managed Grafana instance in the Azure portal.
- Select Overview from the left menu, then open the Endpoint URL.
- In the Grafana portal, go to Connections > Your connections
- Select the data source you want to remove and select Delete.
Run the az grafana data-source delete command to remove an Azure Managed Grafana data source using the Azure CLI. In the sample below, replace the placeholders <instance-name>
and <id>
with the name of the Azure Managed Grafana workspace and the name, ID or UID of the data source.
az grafana data-source delete --name <instance-name> --data-source <id>
[!div class="nextstepaction"] Create a dashboard