【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]

相关文章
|
3月前
|
安全 Windows
【Azure Cloud Service】在Windows系统中抓取网络包 ( 不需要另外安全抓包工具)
通常,在生产环境中,为了保证系统环境的安全和纯粹,是不建议安装其它软件或排查工具(如果可以安装,也是需要走审批流程)。 本文将介绍一种,不用安装Wireshark / tcpdump 等工具,使用Windows系统自带的 netsh trace 命令来获取网络包的步骤
106 32
|
3月前
|
C# Windows
【Azure App Service】在App Service for Windows上验证能占用的内存最大值
根据以上测验,当使用App Service内存没有达到预期的值,且应用异常日志出现OutOfMemory时,就需要检查Platform的设置是否位64bit。
67 11
|
6月前
|
应用服务中间件 Linux 网络安全
【Azure 应用服务】App Service for Linux 环境中为Tomcat页面修改默认的Azure 404页面
【Azure 应用服务】App Service for Linux 环境中为Tomcat页面修改默认的Azure 404页面
|
6月前
|
Java 应用服务中间件 开发工具
[App Service for Windows]通过 KUDU 查看 Tomcat 配置信息
[App Service for Windows]通过 KUDU 查看 Tomcat 配置信息
|
6月前
|
Java 应用服务中间件 Windows
【App Service for Windows】为 App Service 配置自定义 Tomcat 环境
【App Service for Windows】为 App Service 配置自定义 Tomcat 环境
|
6月前
|
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. 错误
|
6月前
|
网络安全 API 数据安全/隐私保护
【Azure App Service】.NET代码实验App Service应用中获取TLS/SSL 证书 (App Service Windows)
【Azure App Service】.NET代码实验App Service应用中获取TLS/SSL 证书 (App Service Windows)
|
6月前
【Azure App Service】列举为App Service集成虚拟网络(VNET)操作时所需要的最小权限
【Azure App Service】列举为App Service集成虚拟网络(VNET)操作时所需要的最小权限
|
6月前
|
Shell PHP Windows
【Azure App Service】Web Job 报错 UNC paths are not supported. Defaulting to Windows directory.
【Azure App Service】Web Job 报错 UNC paths are not supported. Defaulting to Windows directory.
|
6月前
|
Docker 容器
【Azure 应用服务】App Service for Container 无法拉取Docker Hub中的镜像替代方案
【Azure 应用服务】App Service for Container 无法拉取Docker Hub中的镜像替代方案
106 0

热门文章

最新文章

  • 1
    iOS|记一名 iOS 开发新手的前两次 App 审核经历
    10
  • 2
    2025同城线下陪玩APP开发/电竞游戏平台搭建游戏陪玩APP源码/语音APP开发
    17
  • 3
    flutter3-wetrip跨平台自研仿携程app预约酒店系统模板
    25
  • 4
    通过外部链接启动 Flutter App(详细介绍及示例)
    21
  • 5
    【03】仿站技术之python技术,看完学会再也不用去购买收费工具了-修改整体页面做好安卓下载发给客户-并且开始提交网站公安备案-作为APP下载落地页文娱产品一定要备案-包括安卓android下载(简单)-ios苹果plist下载(稍微麻烦一丢丢)-优雅草卓伊凡
    55
  • 6
    【02】仿站技术之python技术,看完学会再也不用去购买收费工具了-本次找了小影-感觉页面很好看-本次是爬取vue需要用到Puppeteer库用node.js扒一个app下载落地页-包括安卓android下载(简单)-ios苹果plist下载(稍微麻烦一丢丢)-优雅草卓伊凡
    46
  • 7
    【01】仿站技术之python技术,看完学会再也不用去购买收费工具了-用python扒一个app下载落地页-包括安卓android下载(简单)-ios苹果plist下载(稍微麻烦一丢丢)-客户的麻将软件需要下载落地页并且要做搜索引擎推广-本文用python语言快速开发爬取落地页下载-优雅草卓伊凡
    40
  • 8
    【Azure Function】Function App门户上的Test/Run返回错误:Failed to fetch
    36
  • 9
    小游戏源码开发之可跨app软件对接是如何设计和开发的
    42
  • 10
    原生鸿蒙版小艺APP接入DeepSeek-R1,为HarmonyOS应用开发注入新活力
    178