2

Is there a way to correlate the logs between Azure Application Gateway Logs and Azure Application Insights?. We need to maps the relations from top-level appliances to application

2 Answers2

0

Azure Application Gateway is an application load balancer for web traffic, available in Azure environment, that manages HTTP and HTTPS traffic of the applications. And Application Insights is an application performance management service for web applications that enables you to do all the monitoring of your website performance in Azure so we can't correlated the logs between Azure Application Gateway and Azure Application Insights.

To monitor the Azure Application Gateway we should uses Azure Monitor. The Azure Monitor Network Insights provides a comprehensive view of health and metrics for all deployed network resources (including Application Gateway), without requiring any configuration. For more detailed explanation of the capabilities read this Azure Monitor Network Insights document.

The logs allow for performance, access, and other data to be saved or consumed from a resource for monitoring purposes. You can use different types of logs in Azure to manage and troubleshoot application gateways like Access logs, Performance logs, Firewall logs and so on. The Azure Application Gateway can send diagnostic logs to a workspace of Log Analytics. This feature is very useful for checking the performance, to detect any errors and is essential for troubleshooting steps, in particular in the presence of the WAF module.

I would suggest to read these Azure Application Gateway: monitoring with Log Analytics and Monitoring Azure Application Gateway documents for more information.

SauravDas-MT
  • 1,224
  • 1
  • 4
  • 10
  • 2
    I don't think this answers the question, which is about how to _correlate_ the logs from these two different Azure Monitor/Log Analytics sources. I think, the OP is talking about this: When a web request is made, it will be logged by both Application Gateway and Application Insights. When starting from an AGW log message, for example, how can we find the matching Application Insights messages? – Fabian Schmied Dec 16 '21 at 09:26
0

Azure Application Gateway will add a special X-appgw-trace-id header to the requests it forwards, see https://learn.microsoft.com/en-us/azure/application-gateway/how-application-gateway-works#modifications-to-the-request. You could log that header to Application Insights (or add it as a custom property to the telemetry items) in order to correlate the logs.

Fabian Schmied
  • 3,885
  • 3
  • 30
  • 49