CmdID / az / az monitor / az monitor metrics
az monitor metrics list-sub
Lists the metric data for a subscription. Azure CLI reference
13 options Its page in the Azure CLI reference
Options
--aggregationThe list of aggregation types (comma separated) to retrieve.--auto-adjust-timegrainWhen set to true, if the timespan passed in is not supported by this metric, the API will return the result using the closest supported timespan.--filterThe **$filter** is used to reduce the set of metric data returned.<br>Example:<br>Metric contains metadata A, B and C.<br>- Return all time series of C where A = a1 and B = b1 or b2<br>**$filter=A eq ‘a1’ and B eq ‘b1’ or B eq ‘b2’ and C eq ‘*’**<br>- Invalid variant:<br>**$filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘*’ or B = ‘b2’**<br>This is invalid because the logical or operator cannot separate two different metadata names.<br>- Return all time series where A = a1, B = b1 and C = c1:<br>**$filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘c1’**<br>- Return all time series where A = a1<br>**$filter=A eq ‘a1’ and B eq ‘*’ and C eq ‘*’**.--intervalThe interval (i.e. timegrain) of the query in ISO 8601 duration format.--metricnamesThe names of the metrics (comma separated) to retrieve.--metricnamespaceMetric namespace where the metrics you want reside.--order-byThe aggregation to use for sorting results and the direction of the sort.--regionThe region where the metrics you want reside.--result-typeReduces the set of data collected.--roll-up-byDimension name(s) to rollup results by.--timespanThe timespan of the query.--topThe maximum number of records to retrieve.--validate-dimensionsWhen set to false, invalid filter parameter values will be ignored.