CmdID / az / az webapp / az webapp troubleshoot / az webapp troubleshoot collect
az webapp troubleshoot collect network-capture
Collect and analyze a packet capture from a Linux web app container. Azure CLI reference
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.
3 examples 6 options Its page in the Azure CLI reference
Examples
Capture and analyze traffic for the default 60 seconds
az webapp troubleshoot collect network-capture -g MyResourceGroup -n MyWebAppIdentify-gName of resource group.-nname of the web app.Capture traffic for 30 seconds from a specific worker
az webapp troubleshoot collect network-capture -g MyResourceGroup -n MyWebApp --instance 7c2d9 --duration 30Identify-gName of resource group.-nname of the web app.--instanceWorker instance to capture.--durationCapture duration in seconds.Show only the raw packet capture link
az webapp troubleshoot collect network-capture -g MyResourceGroup -n MyWebApp --collect-onlyIdentify-gName of resource group.-nname of the web app.--collect-onlyShow only the raw packet capture link.Options
--collect-onlyShow only the raw packet capture link.--durationCapture duration in seconds.--instance, -iWorker instance to capture.--name, -nname of the web app.--resource-group, -gName of resource group.--slot, -sName of the web app slot.