docs/sources/datasources/azure-monitor/troubleshooting/index.md
This document provides solutions to common issues you may encounter when configuring or using the Azure Monitor data source, organized by the stage where the issue occurs.
These errors indicate Grafana can't reach Azure endpoints. Verify connectivity before investigating authentication or query issues.
Symptoms:
Solutions:
Symptoms:
Solutions:
These errors occur when credentials configured in the data source or in Azure are invalid, expired, or missing permissions.
Symptoms:
Possible causes and solutions:
| Cause | Solution |
|---|---|
| App registration doesn't have required permissions | Assign the Reader role to the app registration on the subscription or resource group you want to monitor. Refer to the Azure documentation for role assignments. |
| Incorrect tenant ID, client ID, or client secret | Verify the credentials in the Azure Portal under App registrations > your app > Overview (for IDs) and Certificates & secrets (for secret). |
| Client secret has expired | Create a new client secret in Azure and update the data source configuration. |
| Managed Identity not enabled on the Azure resource | For VMs, enable managed identity in the Azure Portal under Identity. For App Service, enable it under Identity in the app settings. |
| Managed Identity not assigned the Reader role | Assign the Reader role to the managed identity on the target subscription or resources. |
Symptoms:
Solutions:
Symptoms:
Solutions:
Symptoms:
Possible causes and solutions:
| Cause | Solution |
|---|---|
| Certificate has expired | Check the certificate expiration date in Azure Portal under App registrations > your app > Certificates & secrets. Upload a new certificate if expired. |
| Wrong certificate format | Verify you're using the correct format (PEM or PFX) and that the content matches what you selected. PEM requires separate certificate and private key fields. |
| PFX password is incorrect | For encrypted PFX certificates, verify the password is correct. |
| Private key doesn't match the certificate | Ensure the private key corresponds to the certificate uploaded to Azure. Regenerate the certificate and key pair if needed. |
| Certificate not uploaded to Azure | Verify the public certificate is uploaded to the app registration under Certificates & secrets > Certificates in the Azure Portal. |
These errors occur when the Grafana server .ini configuration is missing settings required by Managed Identity, Workload Identity, or Current User authentication. If your Azure credentials are correct but authentication still fails, check this section.
Symptoms:
Solutions:
managed_identity_enabled = true is set in the Grafana server configuration under [azure].managed_identity_client_id is set correctly.Reader role on the target resources.Symptoms:
Solutions:
workload_identity_enabled = true is set in the Grafana server configuration.Symptoms:
401 Unauthorized even though Managed Identity or Workload Identity is correctly configured in Azuremanaged_identity_enabled or workload_identity_enabled is set to true in the Grafana .ini fileCause: The forward_settings_to_plugins setting under [azure] doesn't include the Azure Monitor plugin, so the plugin doesn't receive the Azure authentication settings from the Grafana server.
Solutions:
forward_settings_to_plugins setting under [azure] in your Grafana .ini file.grafana-azure-monitor-datasource is listed. For example:
[azure]
managed_identity_enabled = true
forward_settings_to_plugins = grafana-azure-monitor-datasource
These errors occur when executing queries against Azure Monitor services.
Symptoms:
Possible causes and solutions:
| Cause | Solution |
|---|---|
| Time range doesn't contain data | Expand the dashboard time range or verify data exists in Azure Portal. |
| Wrong resource selected | Verify you've selected the correct subscription, resource group, and resource. |
| Metric not available for resource | Not all metrics are available for all resources. Check available metrics in Azure Portal under the resource's Metrics blade. |
| Metric has no values | Some metrics only populate under certain conditions (for example, error counts when errors occur). |
| Permissions issue | Verify the identity has read access to the specific resource. |
Symptoms:
Solutions for Logs queries:
Solutions for Metrics queries:
Symptoms:
Solutions:
Symptoms:
DatasourceError or context deadline exceededCause: The default data source timeout in Grafana is 30 seconds, but Azure Log Analytics queries can take up to 3 minutes on the Azure side, especially for complex KQL queries or large time ranges.
Solutions:
300 (seconds). Refer to Query timeout for details.summarize to aggregate data instead of returning raw rows.Symptoms:
Solutions:
These errors are specific to Azure Resource Graph (ARG) queries.
Symptoms:
Solutions:
Resources, ResourceContainers).Symptoms:
Solutions:
These errors are specific to the Traces query type.
Symptoms:
Solutions:
These errors are specific to Basic Logs queries.
Symptoms:
Solutions:
Symptoms:
Solutions:
Solutions:
These errors occur when using Azure Monitor data in Grafana alert rules or recording rules. For general alerting configuration, refer to the Azure Monitor alerting documentation.
Symptoms:
Cause: Current User authentication relies on the logged-in user's credentials, which aren't available for background operations like alerting.
Solutions:
Symptoms:
DatasourceError or context deadline exceededSolutions:
300. Refer to Query timeout.For general template variable configuration, refer to the template variables documentation.
valueProp and textProp"Symptoms:
Cause: This error occurs when the Azure Monitor plugin's variable query response format doesn't match what Grafana expects. This was a known bug that affected specific Grafana versions.
Solutions:
Solutions:
Symptoms:
Solutions:
Solutions:
To capture detailed error information for troubleshooting Azure Monitor issues:
Set the Grafana log level to debug in the configuration file:
[log]
level = debug
Restart Grafana for the change to take effect.
Reproduce the issue and review the logs at /var/log/grafana/grafana.log (or your configured log location).
Look for entries containing azuremonitor or azure for Azure Monitor-specific request and response details.
Reset the log level to info after troubleshooting to avoid excessive log volume.
If you've tried the solutions in this document and still encounter issues: