Caution
Grafana Alloy is the new name for our distribution of the OTel collector. Grafana Agent has been deprecated and is in Long-Term Support (LTS) through October 31, 2025. Grafana Agent will reach an End-of-Life (EOL) on November 1, 2025. Read more about why we recommend migrating to Grafana Alloy.
Important: This documentation is about an older version. It's relevant only to the release noted, many of the features and functions have been updated or replaced. Please view the current version.
azure_exporter_config
Overview
The azure_exporter_config
block configures the azure_exporter
integration, an embedded version of
azure-metrics-exporter
, used to
collect metrics from Azure Monitor. The
exporter uses Azure Resource Graph
queries to identify resources for gathering metrics.
List of Supported Services and Metrics
The exporter supports all metrics defined by Azure Monitor. The complete list of available metrics can be found in the Azure Monitor documentation.
Metrics for this integration are exposed with the template azure_{type}_{metric}_{aggregation}_{unit}
. As an example,
the Egress metric for BlobService would be exported as azure_microsoft_storage_storageaccounts_blobservices_egress_total_bytes
.
Authentication
The agent must be running in an environment with access to Azure. The exporter uses the Azure SDK for go and supports authentication via https://learn.microsoft.com/en-us/azure/developer/go/azure-sdk-authentication?tabs=bash#2-authenticate-with-azure.
The account used by Grafana Agent needs:
- Read access to the resources that will be queried by Resource Graph
- Permissions to call the Microsoft.Insights Metrics API which should be the
Microsoft.Insights/Metrics/Read
permission
Configuration
Config Reference
Examples
Azure Kubernetes Service Node Metrics
azure_exporter:
enabled: true
scrape_interval: 60s
subscriptions:
- <subscription_id>
resource_type: microsoft.containerservice/managedclusters
metrics:
- node_cpu_usage_millicores
- node_cpu_usage_percentage
- node_disk_usage_bytes
- node_disk_usage_percentage
- node_memory_rss_bytes
- node_memory_rss_percentage
- node_memory_working_set_bytes
- node_memory_working_set_percentage
- node_network_in_bytes
- node_network_out_bytes
included_resource_tags:
- environment
included_dimensions:
- node
- nodepool
Blob Storage Metrics
azure_exporter:
enabled: true
scrape_interval: 60s
subscriptions:
- <subscription_id>
resource_type: Microsoft.Storage/storageAccounts
metric_namespace: Microsoft.Storage/storageAccounts/blobServices
metrics:
- Availability
- BlobCapacity
- BlobCount
- ContainerCount
- Egress
- IndexCapacity
- Ingress
- SuccessE2ELatency
- SuccessServerLatency
- Transactions
timespan: PT1H
resource_graph_query_filter: where location == "westeurope"
Multiple Azure Services in a single config
The Azure Metrics API has rather strict limitations on the number of parameters which can be supplied. Due to this, you cannot
gather metrics from multiple resource_types
in the same azure_exporter
instance. If you need metrics from multiple resources,
you can enable integration-next
or configure Agent to expose the exporter via the azure_exporter
config with data configured through metrics scrape_configs. The following example configuration combines the two examples above in a single Agent configuration.
Note: This is not a complete configuration; blocks have been removed for simplicity.
In this example, all azure_exporter
-specific configuration settings have been moved to the scrape_config
. This method supports all available configuration options except azure_cloud_environment
, which must be configured on the azure_exporter
. For this method, if a field supports a singular value like resource_graph_query_filter
, you
must be put it into an array, for example, resource_graph_query_filter: ["where location == 'westeurope'"]
.