Azure 应用程序网关和 Azure Application Insights 之间的关联

Posted

技术标签:

【中文标题】Azure 应用程序网关和 Azure Application Insights 之间的关联【英文标题】:Correlation between Azure Application Gateway and Azure Application Insights 【发布时间】:2022-01-11 20:41:00 【问题描述】:

有没有办法将 Azure 应用程序网关日志和 Azure Application Insights 之间的日志关联起来?我们需要将***设备的关系映射到应用程序

【问题讨论】:

【参考方案1】:

Azure 应用程序网关是用于 Web 流量的应用程序负载平衡器,可在 Azure 环境中使用,用于管理应用程序的 HTTP 和 HTTPS 流量。 Application Insights 是针对 Web 应用程序的应用程序性能管理服务,它使您能够在 Azure 中对您的网站性能进行所有监控,因此我们无法关联 Azure Application Gateway 和 Azure Application Insights 之间的日志。

要监控 Azure 应用程序网关,我们应该使用 Azure MonitorAzure Monitor Network Insights 为所有已部署的网络资源(包括应用程序网关) 提供运行状况和指标的全面视图,无需任何配置。有关这些功能的更详细说明,请阅读此Azure Monitor Network Insights 文档。

日志允许从资源中保存或使用性能、访问和其他数据以进行监控。您可以在 Azure 中使用不同类型的日志来管理应用程序网关并对其进行故障排除,例如访问日志、性能日志、防火墙日志等。 Azure 应用程序网关可以将诊断日志发送到 Log Analytics 的工作区。此功能对于检查性能、检测任何错误非常有用,并且对于故障排除步骤至关重要,尤其是在存在 WAF 模块的情况下。

我建议阅读这些Azure Application Gateway: monitoring with Log Analytics 和Monitoring Azure Application Gateway 文档以了解更多信息。

【讨论】:

我认为这不能回答问题,即如何关联来自这两个不同 Azure Monitor/Log Analytics 源的日志。我认为,OP 正在谈论这个:当发出 Web 请求时,Application Gateway 和 Application Insights 都会记录它。例如,从 AGW 日志消息开始时,我们如何找到匹配的 Application Insights 消息?

以上是关于Azure 应用程序网关和 Azure Application Insights 之间的关联的主要内容,如果未能解决你的问题,请参考以下文章

Azure 应用程序网关与 API AppService 没有 API 网关

上手DocumentDB On Azure

12.Azure应用程序网关(下)

12.Azure应用程序网关(下)

使用 Azure 应用网关 + APIM 进行 SSL 固定

azure web 应用端到端 SSL 的 Azure 应用程序网关前端获取 404