az monitor metrics

View Azure resource metrics.

Commands

az monitor metrics list List metric values for a resource.
az monitor metrics list-definitions List metric definitions for a resource.

az monitor metrics list

List metric values for a resource.

az monitor metrics list --metric-names
--resource
--time-grain
[--end-time]
[--resource-group]
[--resource-namespace]
[--resource-parent]
[--resource-type]
[--start-time]

Required Parameters

--metric-names
The space separated list of metric names.
--resource
Name or ID of the target resource.
--time-grain
The time grain. Granularity of the metric data returned in ISO 8601 duration format, eg "PT1M".

Optional Parameters

--end-time
The end time of the query. In ISO format with explicit indication of timezone: 1970-01-01T00:00:00Z, 1970-01-01T00:00:00-0500. Defaults to current time.
--resource-group -g
Name of resource group. You can configure the default group using `az configure --defaults group=<name>`.
--resource-namespace
Target resource provider namespace.
--resource-parent
Target resource parent path, if applicable.
--resource-type
Target resource type. Can also accept namespace/type format (Ex: 'Microsoft.Compute/virtualMachines)').
--start-time
The start time of the query. In ISO format with explicit indication of timezone: 1970-01-01T00:00:00Z, 1970-01-01T00:00:00-0500. Defaults to 1 Hour prior to the current time.

az monitor metrics list-definitions

List metric definitions for a resource.

az monitor metrics list-definitions --resource
[--metric-names]
[--resource-group]
[--resource-namespace]
[--resource-parent]
[--resource-type]

Required Parameters

--resource
Name or ID of the target resource.

Optional Parameters

--metric-names
The list of metric names.
--resource-group -g
Name of resource group. You can configure the default group using `az configure --defaults group=<name>`.
--resource-namespace
Target resource provider namespace.
--resource-parent
Target resource parent path, if applicable.
--resource-type
Target resource type. Can also accept namespace/type format (Ex: 'Microsoft.Compute/virtualMachines)').