az monitor app-insights metrics

Retrieve metrics from an application.

Commands

az monitor app-insights metrics get-metadata

Get the metadata for metrics on a particular application.

az monitor app-insights metrics show

View the value of a single metric.

az monitor app-insights metrics get-metadata

Get the metadata for metrics on a particular application.

az monitor app-insights metrics get-metadata --app
                                             [--resource-group]

Examples

Views the metadata for the provided app.

az monitor app-insights metrics get-metadata --app e292531c-eb03-4079-9bb0-fe6b56b99f8b

Required Parameters

--app -a

GUID, app name, or fully-qualified Azure resource name of Application Insights component. The application GUID may be acquired from the API Access menu item on any Application Insights resource in the Azure portal. If using an application name, please specify resource group.

Optional Parameters

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

az monitor app-insights metrics show

View the value of a single metric.

az monitor app-insights metrics show --app
                                     --metrics
                                     [--aggregation]
                                     [--end-time]
                                     [--filter]
                                     [--interval]
                                     [--offset]
                                     [--orderby]
                                     [--resource-group]
                                     [--segment]
                                     [--start-time]
                                     [--top]

Examples

View the count of availabilityResults events.

az monitor app-insights metrics show --app e292531c-eb03-4079-9bb0-fe6b56b99f8b --metric availabilityResults/count

Required Parameters

--app -a

GUID, app name, or fully-qualified Azure resource name of Application Insights component. The application GUID may be acquired from the API Access menu item on any Application Insights resource in the Azure portal. If using an application name, please specify resource group.

--metrics -m

The metric to retrieve. May be either a standard AI metric or an application-specific custom metric.

Optional Parameters

--aggregation

The aggregation to use when computing the metric values. To retrieve more than one aggregation at a time, separate them with a comma. If no aggregation is specified, then the default aggregation for the metric is used.

--end-time

End of time range for current operation. Defaults to the current time. Format: date (yyyy-mm-dd) time (hh:mm:ss.xxxxx) timezone (+/-hh:mm).

--filter

An expression used to filter the results. This value should be a valid OData filter expression where the keys of each clause should be applicable dimensions for the metric you are retrieving.

--interval

The interval over which to aggregate metrics, in ##h##m format.

--offset

Time offset of the query range, in ##d##h format.

default value: 1h
--orderby

The aggregation function and direction to sort the segments by. This value is only valid when segment is specified.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--segment

The name of the dimension to segment the metric values by. This dimension must be applicable to the metric you are retrieving. To segment by more than one dimension at a time, separate them with a comma (,). In this case, the metric data will be segmented in the order the dimensions are listed in the parameter.

--start-time

Start-time of time range for which to retrieve data. Format: date (yyyy-mm-dd) time (hh:mm:ss.xxxxx) timezone (+/-hh:mm).

--top

The number of segments to return. This value is only valid when segment is specified.