Azure Metrics
Synopsis
Creates an Azure Metrics client that collects metric data from Azure Monitor. Queries metrics from specified Azure resources with configurable aggregation types, time intervals, and filtering options.
Schema
- id: <numeric>
name: <string>
description: <string>
type: azmetrics
tags: <string[]>
pipelines: <pipeline[]>
status: <boolean>
properties:
tenant_id: <string>
client_id: <string>
client_secret: <string>
resource_uri: <string>
namespace: <string>
metrics: <string>
aggregation: <string>
interval: <string>
order_by: <string>
filter: <string>
result_type: <string>
batch_size: <numeric>
Configuration
The following fields are used to define the device.
Device
| Field | Required | Default | Description |
|---|---|---|---|
id | Y | Unique identifier | |
name | Y | Device name | |
description | N | - | Optional description |
type | Y | Must be azmetrics | |
tags | N | - | Optional tags |
pipelines | N | - | Optional pre-processor pipelines |
status | N | true | Enable/disable the device |
Authentication
| Field | Required | Default | Description |
|---|---|---|---|
tenant_id | Y | Azure tenant ID | |
client_id | Y | Azure client ID | |
client_secret | Y | Azure client secret |
Resource
| Field | Required | Default | Description |
|---|---|---|---|
resource_uri | Y | Azure resource ID to query metrics from | |
namespace | N | - | Metric namespace to filter results |
Query Options
| Field | Required | Default | Description |
|---|---|---|---|
metrics | N | - | Specific metric names to collect (comma-separated or array) |
aggregation | N | - | Aggregation type: Average, Count, Maximum, Minimum, None, Total |
interval | N | PT1M | Time grain for metric aggregation (ISO 8601 duration) |
order_by | N | TimeStamp asc | Sort order for results |
filter | N | - | OData filter expression to refine results |
result_type | N | - | Result type: Data or Metadata |
batch_size | N | 10000 | Maximum number of metric values per request |
Examples
The following are commonly used configuration types.
Basic
The minimum required configuration:
Collecting metrics from an Azure VM... | |
Specific Metrics
Collecting specific metrics with aggregation:
Targeting CPU and memory metrics with average aggregation... | |
Available metrics vary by resource type. See the Azure Monitor metrics reference for supported metrics per resource.
Storage Account Metrics
Monitoring Azure Storage performance:
Collecting storage transaction metrics... | |
High-Resolution Collection
Fine-grained metric collection for detailed analysis:
Collecting metrics at 1-minute intervals with maximum values... | |
High-resolution metric collection with short intervals increases API calls and may impact Azure Monitor costs. Use appropriate intervals based on monitoring requirements.