This is documentation for the next version of Grafana documentation. For the latest stable release, go to the latest version.

Grafana Cloud Enterprise Open source
Last reviewed: August 11, 2026

Azure Monitor data source

The Azure Monitor data source plugin allows you to query and visualize data from Azure Monitor, the Azure service to maximize the availability and performance of applications and services in the Azure Cloud.

Supported features

FeatureSupported
MetricsYes
LogsYes
TracesYes
AlertingYes
AnnotationsYes

Note

The Azure Monitor data source requires Grafana 12.3 or later.

Supported Azure clouds

The Azure Monitor data source supports the following Azure cloud environments:

  • Azure - Azure public cloud (default)
  • Azure US Government - Azure Government cloud
  • Azure China - Azure China cloud operated by 21Vianet

Supported Azure services

The Azure Monitor data source supports the following Azure services:

ServiceDescription
Azure Monitor MetricsCollect numeric data from resources in your Azure account. Supports dimensions, aggregations, and time grain configuration.
Azure Monitor LogsCollect log and performance data from your Azure account using the Kusto Query Language (KQL).
Azure Resource GraphQuery your Azure resources across subscriptions using KQL. Useful for inventory, compliance, and resource management.
Application Insights TracesCollect distributed trace data and correlate requests across your application components.

Get started

The following documents help you get started with the Azure Monitor data source:

Additional features

After you have configured the Azure Monitor data source, you can:

  • Add Annotations to overlay Azure log events on your graphs.
  • Configure and use Template variables for dynamic dashboards.
  • Add Transformations to manipulate query results.
  • Set up Alerting and recording rules using Metrics, Logs, Traces, and Resource Graph queries.
  • Use Explore to investigate your Azure data without building a dashboard.

Pre-built dashboards

The Azure Monitor plugin includes pre-built dashboards organized by category:

Infrastructure monitoring:

  • Azure / Infrastructure / Apps Monitoring
  • Azure / Infrastructure / Compute Monitoring
  • Azure / Infrastructure / Data Monitoring
  • Azure / Infrastructure / Network Monitoring
  • Azure / Infrastructure / Storage and Key Vaults Monitoring

Azure Insights:

  • Azure / Insights / Applications
  • Azure / Insights / Applications / Performance / Operations
  • Azure / Insights / Applications / Performance / Dependencies
  • Azure / Insights / Applications / Failures / Operations
  • Azure / Insights / Applications / Failures / Dependencies
  • Azure / Insights / Applications / Failures / Exceptions
  • Azure / Insights / Applications Test Availability Geo Map
  • Azure / Insights / CosmosDB
  • Azure / Insights / Data Explorer Clusters
  • Azure / Insights / Key Vaults
  • Azure / Insights / Networks
  • Azure / Insights / SQL Database
  • Azure / Insights / Storage Accounts
  • Azure / Insights / Virtual Machines by Resource Group
  • Azure / Insights / Virtual Machines by Workspace

Other:

  • Azure / Alert Consumption
  • Azure / Azure PostgreSQL / Flexible Server Monitoring
  • Azure Monitor / Container Insights / Syslog
  • Azure / Resources Overview

To import a pre-built dashboard:

  1. Go to Connections > Data sources.
  2. Select your Azure Monitor data source.
  3. Click the Dashboards tab.
  4. Click Import next to the dashboard you want to use.

Plugin updates

Always ensure that your plugin version is up-to-date so you have access to all current features and improvements. Navigate to Plugins and data > Plugins to check for updates. Grafana recommends upgrading to the latest Grafana version, and this applies to plugins as well.

Note

Plugins are automatically updated in Grafana Cloud.

Query with the Grafana CLI

You can query this data source from the command line and from AI coding agents using the Grafana CLI, gcx. gcx gives you and your agent structured, terminal-based access to your Grafana data sources, which is useful for automation and agent-driven investigations.

gcx supports Grafana Cloud and Grafana OSS or Enterprise v12 and later. Before you query, install and authenticate gcx. Refer to the gcx CLI documentation for installation, configuration, and the full command reference.

For example, to explore and query your Azure Monitor data source, use the gcx datasources azuremonitor commands:

sh
# Discover subscriptions, resource groups, and resources
gcx datasources azuremonitor list-subscriptions -d <DATASOURCE_UID>
gcx datasources azuremonitor list-resource-groups -d <DATASOURCE_UID> --subscription <SUBSCRIPTION_ID>
gcx datasources azuremonitor list-resources -d <DATASOURCE_UID> --subscription <SUBSCRIPTION_ID> --resource-group my-rg

# List the metrics available for a resource
gcx datasources azuremonitor list-metrics -d <DATASOURCE_UID> --subscription <SUBSCRIPTION_ID> \
  --resource-group my-rg --namespace Microsoft.Compute/virtualMachines --resource my-vm

# Run a structured metrics query
gcx datasources azuremonitor query -d <DATASOURCE_UID> --subscription <SUBSCRIPTION_ID> \
  --resource-group my-rg --namespace Microsoft.Compute/virtualMachines --resource my-vm \
  --metric 'Percentage CPU' --aggregation Average --since 1h

# Query a Log Analytics workspace with KQL
gcx datasources azuremonitor logs query 'AppRequests | take 10' -d <DATASOURCE_UID> \
  --subscription <SUBSCRIPTION_ID> --resource-group my-rg --workspace my-workspace

# Query Azure Resource Graph with KQL
gcx datasources azuremonitor resource-graph query 'Resources | project name, type | limit 10' \
  -d <DATASOURCE_UID> --subscription <SUBSCRIPTION_ID>

Replace <DATASOURCE_UID> with the UID of your Azure Monitor data source and <SUBSCRIPTION_ID> with an Azure subscription ID. You can omit the -d flag when datasources.azuremonitor is configured in your gcx context. Metrics queries are structured rather than expression-based, so --subscription, --resource-group, --namespace, --resource, and --metric are required, while logs query and resource-graph query take KQL. Data sources configured with Current User authentication can’t be queried with API tokens or service accounts.