Share via


az monitor app-insights events

Note

This reference is part of the application-insights extension for the Azure CLI (version 2.55.0 or higher). The extension will automatically install the first time you run an az monitor app-insights events command. Learn more about extensions.

Retrieve events from an application.

Commands

Name Description Type Status
az monitor app-insights events show

List events by type or view a single event from an application, specified by type and ID.

Extension GA

az monitor app-insights events show

List events by type or view a single event from an application, specified by type and ID.

az monitor app-insights events show --type {$all, availabilityResults, browserTimings, customEvents, customMetrics, dependencies, exceptions, pageViews, performanceCounters, requests, traces}
                                    [--app]
                                    [--end-time]
                                    [--event]
                                    [--ids]
                                    [--offset]
                                    [--resource-group]
                                    [--start-time]
                                    [--subscription]

Examples

Get an availability result by ID.

az monitor app-insights events show --app 578f0e27-12e9-4631-bc02-50b965da2633 --type availabilityResults --event b2cf08df-bf42-4278-8d2c-5b55f85901fe

List availability results from the last 24 hours.

az monitor app-insights events show --app 578f0e27-12e9-4631-bc02-50b965da2633 --type availabilityResults --offset 24h

Required Parameters

--type

The type of events to retrieve.

Accepted values: $all, availabilityResults, browserTimings, customEvents, customMetrics, dependencies, exceptions, pageViews, performanceCounters, requests, traces

Optional 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.

--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).

--event

GUID of the event to retrieve. This could be obtained by first listing and filtering events, then selecting an event of interest.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--offset

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

Can be used with either --start-time or --end-time. If used with --start-time, then the end time will be calculated by adding the offset. If used with --end-time (default), then the start time will be calculated by subtracting the offset. If --start-time and --end-time are provided, then --offset will be ignored.

Default value: 1h
--resource-group -g

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

--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).

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.