---
title: azure_exporter_config
aliases:
- ../../../configuration/integrations/azure-exporter-config/
---
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:
Configuration
Config Reference
[enabled: <boolean> | default = false]
[instance: <string>]
[scrape_integration: <boolean> | default = <integrations_config.scrape_integrations>]
[scrape_interval: <duration> | default = <global_config.scrape_interval>]
[scrape_timeout: <duration> | default = <global_config.scrape_timeout>]
relabel_configs:
[- <relabel_config> ... ]
metric_relabel_configs:
[ - <relabel_config> ... ]
[wal_truncate_frequency: <duration> | default = "60m"]
subscriptions:
[ - <string> ... ]
[resource_type: <string>]
metrics:
[ - <string> ... ]
[resource_graph_query_filter: <string>]
metric_aggregations:
[ - <string> ... ]
[timespan: <string> | default = "PT1M"]
included_dimensions:
[ - <string> ... ]
included_resource_tags:
[ - <string> ... ]
[metric_namespace: <string>]
[azure_cloud_environment: <string> | default = "azurecloud"]
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.
integrations:
azure_exporter:
enabled: true
scrape_integration: false
azure_cloud_environment: azurecloud
metrics:
configs:
- name: integrations
scrape_configs:
- job_name: azure-blob-storage
scrape_interval: 1m
scrape_timeout: 50s
static_configs:
- targets: ["localhost:12345"]
metrics_path: /integrations/azure_exporter/metrics
params:
subscriptions:
- 179c4f30-ebd8-489e-92bc-fb64588dadb3
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'"]
- job_name: azure-kubernetes-node
scrape_interval: 1m
scrape_timeout: 50s
static_configs:
- targets: ["localhost:12345"]
metrics_path: /integrations/azure_exporter/metrics
params:
subscriptions:
- 179c4f30-ebd8-489e-92bc-fb64588dadb3
resource_type: ["microsoft.containerservice/managedclusters"]
resource_graph_query_filter: [" where location == 'westeurope'"]
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
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'"]
.