Skip to main content

metrics

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

Overview

Namemetrics
TypeResource
Idazure.monitor.metrics

Fields

NameDatatypeDescription
idstringThe metric Id.
nameobjectThe localizable string class.
displayDescriptionstringDetailed description of this metric.
errorCodestring'Success' or the error details on query failures for this metric.
errorMessagestringError message encountered querying this specific metric.
timeseriesarrayThe time series returned when a data query is performed.
typestringThe resource type of the metric resource.
unitstringThe unit of the metric.

Methods

NameAccessible byRequired ParamsDescription
listSELECTinterval, metricName, resourceUri, timespanLists the metric values for a resource.

SELECT examples

Lists the metric values for a resource.

SELECT
id,
name,
displayDescription,
errorCode,
errorMessage,
timeseries,
type,
unit
FROM azure.monitor.metrics
WHERE interval = '{{ interval }}'
AND metricName = '{{ metricName }}'
AND resourceUri = '{{ resourceUri }}'
AND timespan = '{{ timespan }}';