Caution
Grafana Agent has reached End-of-Life (EOL) on November 1, 2025. Agent is no longer receiving vendor support and will no longer receive security or bug fixes. Current users of Agent Static mode, Agent Flow mode, and Agent Operator should proceed with migrating to Grafana Alloy. If you have already migrated to Alloy, no further action is required. Read more about why we recommend migrating to Grafana Alloy.
prometheus.exporter.azure
The prometheus.exporter.azure component embeds azure-metrics-exporter to collect metrics from Azure Monitor.
The exporter supports all metrics defined by Azure Monitor. You can find the complete list of available metrics in the Azure Monitor documentation.
Metrics for this integration are exposed with the template azure_{type}_{metric}_{aggregation}_{unit} by default. As an example,
the Egress metric for BlobService would be exported as azure_microsoft_storage_storageaccounts_blobservices_egress_total_bytes.
The exporter offers the following two options for gathering metrics.
- (Default) Use an Azure Resource Graph query to identify resources for gathering metrics.
- This query will make one API call per resource identified.
- Subscriptions with a reasonable amount of resources can hit the 12000 requests per hour rate limit Azure enforces.
- Set the regions to gather metrics from and get metrics for all resources across those regions.
- This option will make one API call per subscription, dramatically reducing the number of API calls.
- This approach does not work with all resource types, and Azure does not document which resource types do or do not work.
- A resource type that is not supported produces errors that look like
Resource type: microsoft.containerservice/managedclusters not enabled for Cross Resource metrics. - If you encounter one of these errors you must use the default Azure Resource Graph based option to gather metrics.
Authentication
Grafana Agent Flow must be running in an environment with access to Azure. The exporter uses the Azure SDK for go and supports authentication.
The account used by Grafana Agent Flow needs:
- When using an Azure Resource Graph query, 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/Readpermission
Usage
prometheus.exporter.azure LABEL {
subscriptions = [
SUB_ID_1,
SUB_ID_2,
...
]
resource_type = RESOURCE_TYPE
metrics = [
METRIC_1,
METRIC_2,
...
]
}Arguments
You can use the following arguments to configure the exporter’s behavior. Omitted fields take their default values.