Skip to main content

metric_definitions

Creates, updates, deletes, gets or lists a metric_definitions resource.

Overview

Namemetric_definitions
TypeResource
Idazure.monitor.metric_definitions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe resource identifier of the metric definition.
nameobjectThe localizable string class.
categorystringCustom category name for this metric.
dimensionsarrayThe name and the display name of the dimension, i.e. it is a localizable string.
displayDescriptionstringDetailed description of this metric.
isDimensionRequiredbooleanFlag to indicate whether the dimension is required.
metricAvailabilitiesarrayThe collection of what aggregation intervals are available to be queried.
metricClassstringThe class of the metric. Known values are: "Availability", "Transactions", "Errors", "Latency", and "Saturation". (Availability, Transactions, Errors, Latency, Saturation)
namespacestringThe namespace the metric belongs to.
primaryAggregationTypestringThe primary aggregation type value defining how to use the values for display. Known values are: "None", "Average", "Count", "Minimum", "Maximum", and "Total". (None, Average, Count, Minimum, Maximum, Total)
resourceIdstringThe resource identifier of the resource that emitted the metric.
supportedAggregationTypesarrayThe collection of what aggregation types are supported.
unitstringThe unit of the metric. Known values are: "Count", "Bytes", "Seconds", "CountPerSecond", "BytesPerSecond", "Percent", "MilliSeconds", "ByteSeconds", "Unspecified", "Cores", "MilliCores", "NanoCores", and "BitsPerSecond". (Count, Bytes, Seconds, CountPerSecond, BytesPerSecond, Percent, MilliSeconds, ByteSeconds, Unspecified, Cores, MilliCores, NanoCores, BitsPerSecond)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_at_subscription_scopeselectsubscription_id, regionmetricnamespaceLists the metric definitions for the subscription.
listselectresource_urimetricnamespaceLists the metric definitions for the resource.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringThe region where the metrics you want reside. Required.
resource_uristringThe fully qualified Azure Resource manager identifier of the resource. Required.
subscription_idstring
metricnamespacestringMetric namespace where the metrics you want reside. Default value is None.

SELECT examples

Lists the metric definitions for the subscription.

SELECT
id,
name,
category,
dimensions,
displayDescription,
isDimensionRequired,
metricAvailabilities,
metricClass,
namespace,
primaryAggregationType,
resourceId,
supportedAggregationTypes,
unit
FROM azure.monitor.metric_definitions
WHERE subscription_id = '{{ subscription_id }}' -- required
AND region = '{{ region }}' -- required
AND metricnamespace = '{{ metricnamespace }}'
;