【Azure 应用服务】更便捷的方式抓取Azure App Service for Windows的网络包

简介: 【Azure 应用服务】更便捷的方式抓取Azure App Service for Windows的网络包

问题描述

在之前的一篇博文中,介绍了在App Service中抓取网络日志:

  1. 抓取Windows的网络包:【应用服务 App Service】App Service中抓取网络日志
  2. 抓取Linux的网络包:【Azure 应用服务】App Service For Linux 如何在 Web 应用实例上住抓取网络日志

现在,随着App Service的更新,Linnx也可以直接登录到SSH而不在需要复杂的配置操作。同时Windows环境中,也不在需要在本地安装 armclient.exe工具,而是直接通过 App Service的门户完成抓取,下载操作。

 

操作步骤

第一步: 进入App Service的Overview页面,点击“Diagnose and solve problems”, 然后再选择“ Diagnostic Tools” 方块

(注意: Diagnostic Tools路径变动,查看下图中的步骤)

 

第二步:选择 Collect Network Trace , 并设定抓取日志的时间长度, 60秒 ~ 15分钟的值供选择。页面中也对抓取网络日志的情况进行了说明:

Collect a Network Trace

If your app is facing issues while connecting to a remote server, you can use this tool to collect a network trace on the instance(s) serving the Web App.

Analyzing network traces is complex and time consuming task. Before collecting a network trace, please make sure you understand that you really need to collect a network trace to troubleshoot the problem.

What you should know before collecting a Network Trace

  • 网络日志帮助定位TCP丢包,检查App Service与其他服务之间的HTTP通信情况(Network traces are helpful to troubleshoot TCP packet loss and to check HTTP communication that your App is making with the remote endpoints.)
  • 在开始抓取网络日志后,要在App Service上重新我们需要抓包解决的问题(After the network trace is started, you should reproduce the problem so that outbound traffic from your App gets captured in the trace.)
  • 如果适用HTTPS,那么数据将被加密(If the remote endpoints are called over TLS or SSL (i.e. HTTPS), then the traffic in the trace will be encrypted.)
  • 将会收集应用所在的全部实例上的网络包(Network traces are collected on all the instance(s) serving your App.)
  • 抓取网络日志只包含当前正在运行进程。当抓取网络包开始后,新的进程的网络包将不被抓取(Traces are captured only of processes that are running when the trace is started. The trace does not capture packets of any processes that start after the capture is started.)
  • 可以适用Network Monitor和Wireshark工具对网络包进行分析(To analyze the Network Trace, you need tools like Network Monitor or Wireshark that can open the network captures.)

 

第三步:等待抓取时间完成,页面会直接显示网络包的下载地址。点击即可。

PS:此处不需要在登录到Kudu站点中,到 c:\home\logfiles\networktrace 目录中进行下载,但是如果要查看历史的网络抓包文件,还是需要到Kudu站点中下载。

 

 

注意:当前App Service For Linux环境,还是不支持以上方式抓包。 需要SSH,然后执行以下命令:

tcpdump -i any host <your app service inbound ip address> and tcp port 443 -n -v -s 0 -w /tmp/appnetworktrace.pcap  

 

[END]

相关文章
|
16天前
|
监控 网络协议 安全
|
2天前
|
数据采集 存储 监控
网络爬虫的最佳实践:结合 set_time_limit() 与 setTrafficLimit() 抓取云盘数据
本文探讨了如何利用 PHP 的 `set_time_limit()` 与爬虫工具的 `setTrafficLimit()` 方法,结合多线程和代理 IP 技术,高效稳定地抓取百度云盘的公开资源。通过设置脚本执行时间和流量限制,使用多线程提高抓取效率,并通过代理 IP 防止 IP 封禁,确保长时间稳定运行。文章还提供了示例代码,展示了如何具体实现这一过程,并加入了数据分类统计功能以监控抓取效果。
33 16
网络爬虫的最佳实践:结合 set_time_limit() 与 setTrafficLimit() 抓取云盘数据
|
3天前
|
存储 弹性计算 测试技术
阿里云服务器实例规格vCPU、内存、网络带宽、网络收发包PPS、连接数等性能指标详解
阿里云服务器ECS实例可以分为多种实例规格族。根据CPU、内存等配置,一种实例规格族又分为多种实例规格。而实例规格又包含vCPU、处理器、内存、vTPM、本地存储、网络带宽、网络收发包PPS、连接数、弹性网卡、云盘带宽、云盘IOPS等指标,本文为大家详细介绍实例规格的这些指标,以供大家了解和选择。
阿里云服务器实例规格vCPU、内存、网络带宽、网络收发包PPS、连接数等性能指标详解
|
2天前
|
网络协议 网络虚拟化
接收网络包的过程——从硬件网卡解析到IP
【9月更文挑战第18天】这段内容详细描述了网络包接收过程中机制。当网络包触发中断后,内核处理完这批网络包,会进入主动轮询模式,持续处理后续到来的包,直至处理间隙返回其他任务,从而减少中断次数,提高处理效率。此机制涉及网卡驱动初始化时注册轮询函数,通过软中断触发后续处理,并逐步深入内核网络协议栈,最终到达TCP层。整个接收流程分为多个层次,包括DMA技术存入Ring Buffer、中断通知CPU、软中断处理、以及进入内核网络协议栈等多个步骤。
|
22天前
|
存储 缓存 网络协议
网络丢包排查方法
网络丢包排查方法
|
20天前
|
数据采集 存储 JavaScript
构建你的首个Python网络爬虫:抓取、解析与存储数据
【8月更文挑战第31天】在数字时代的浪潮中,数据成为了新的石油。了解如何从互联网的海洋中提取有价值的信息,是每个技术爱好者的必备技能。本文将引导你通过Python编程语言,利用其强大的库支持,一步步构建出你自己的网络爬虫。我们将探索网页请求、内容解析和数据存储等关键环节,并附上代码示例,让你轻松入门网络数据采集的世界。
|
17天前
|
网络安全 虚拟化 Windows
windows 11安装openSSH server 遇到的"kex_exchange_identification: read: Connection reset"问题
windows 11安装openSSH server 遇到的"kex_exchange_identification: read: Connection reset"问题
|
26天前
|
PHP Windows
【Azure App Service for Windows】 PHP应用出现500 : The page cannot be displayed because an internal server error has occurred. 错误
【Azure App Service for Windows】 PHP应用出现500 : The page cannot be displayed because an internal server error has occurred. 错误
|
1月前
|
开发框架 .NET API
Windows Server 2022 安装IIS 报错 访问临时文件夹 C:\WINDOWS\TEMP\3C 读取/写入权限 错误: 0x80070005
Windows Server 2022 安装IIS 报错 访问临时文件夹 C:\WINDOWS\TEMP\3C 读取/写入权限 错误: 0x80070005
71 0
|
1月前
|
Linux Docker Windows
Windows——Docker拉取Windows Server镜像
Windows——Docker拉取Windows Server镜像
100 0