az webapp troubleshoot collect
Command group 'webapp troubleshoot' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Collect diagnostic artifacts from a Linux web app.
Commands
| Name | Description | Type | Status |
|---|---|---|---|
| az webapp troubleshoot collect network-capture |
Collect and analyze a packet capture from a Linux web app container. |
Core | Preview |
az webapp troubleshoot collect network-capture
Command group 'webapp troubleshoot collect' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Collect and analyze a packet capture from a Linux web app container.
Runs a bounded tcpdump capture in one app container instance and analyzes it in Kudu. The command does not download files locally; it returns authenticated Kudu links for viewing the analysis report and downloading the raw pcap. Network captures can contain credentials, cookies, request bodies, and other sensitive application data.
Use --collect-only to show only the raw packet capture link. Kudu still performs the processing required to finalize the capture, but the analysis report link is omitted.
This command supports Linux web apps on dedicated App Service plans. Captures are limited to one worker instance per command invocation. When --instance is omitted, an interactive terminal prompts you to select from the app's current workers. Scripts and other non-interactive callers must specify --instance. Capture duration defaults to 60 seconds and can be changed with --duration.
az webapp troubleshoot collect network-capture --name
--resource-group
[--acquire-policy-token]
[--change-reference]
[--collect-only {false, true}]
[--duration]
[--instance]
[--slot]
Examples
Capture and analyze traffic for the default 60 seconds
az webapp troubleshoot collect network-capture -g MyResourceGroup -n MyWebApp
Capture traffic for 30 seconds from a specific worker
az webapp troubleshoot collect network-capture -g MyResourceGroup -n MyWebApp --instance 7c2d9 --duration 30
Show only the raw packet capture link
az webapp troubleshoot collect network-capture -g MyResourceGroup -n MyWebApp --collect-only
Required Parameters
Name of the web app. If left unspecified, a name will be randomly generated. You can configure the default using az configure --defaults web=<name>.
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Acquiring an Azure Policy token automatically for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
The related change reference ID for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
Show only the raw packet capture link. Kudu still finalizes the capture internally, but the analysis report link is omitted.
| Property | Value |
|---|---|
| Default value: | False |
| Accepted values: | false, true |
Capture duration in seconds. Valid range: 1-300.
| Property | Value |
|---|---|
| Default value: | 60 |
Worker instance to capture. When omitted in an interactive terminal, you are prompted to select from the current instances. Specify this option for scripts and other non-interactive use. Only one instance can be captured at a time.
Name of the web app slot. Defaults to the production slot.
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
| Property | Value |
|---|---|
| Default value: | False |