Skip to content

Commit c50a5e5

Browse files
Merge pull request #286751 from jaesoni/diag-logs-appgw-update
Diag logs appgw update
2 parents cca7027 + c1588e5 commit c50a5e5

File tree

1 file changed

+19
-9
lines changed

1 file changed

+19
-9
lines changed

articles/application-gateway/log-analytics.md

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,53 @@
11
---
2-
title: Examine WAF logs using Azure Log Analytics
2+
title: Examining logs using Azure Log Analytics
33
titleSuffix: Azure Application Gateway
44
description: This article shows you how you can use Azure Log Analytics to examine Application Gateway Web Application Firewall (WAF) logs.
55
services: application-gateway
66
author: greg-lindsay
77
ms.service: azure-application-gateway
88
ms.topic: troubleshooting
9-
ms.date: 07/24/2023
9+
ms.date: 09/16/2024
1010
ms.author: greglin
1111
---
1212

13-
# Use Log Analytics to examine Application Gateway Web Application Firewall (WAF) Logs
13+
# Use Log Analytics to examine Application Gateway Logs
1414

15-
Once your Application Gateway WAF is operational, you can enable logs to inspect what is happening with each request. Firewall logs give insight to what the WAF is evaluating, matching, and blocking. With Log Analytics, you can examine the data inside the firewall logs to give even more insights. For more information about log queries, see [Overview of log queries in Azure Monitor](/azure/azure-monitor/logs/log-query-overview).
15+
Once your Application Gateway is operational, you can enable logs to inspect the events that occur for your resource. For example, the Application Gateway Firewall logs give insight to what the Web Application Firewall (WAF) is evaluating, matching, and blocking. With Log Analytics, you can examine the data inside the firewall logs to give even more insights. For more information about log queries, see [Overview of log queries in Azure Monitor](/azure/azure-monitor/logs/log-query-overview).
16+
17+
In this article, we will look at the Web Application Firewall (WAF) logs. You can set up [other Application Gateway logs](application-gateway-diagnostics.md) in a similar way.
1618

1719
## Prerequisites
1820

1921
* An Azure account with an active subscription is required. If you don't already have an account, you can [create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
20-
* An Azure Web Application Firewall with logs enabled. For more information, see [Azure Web Application Firewall on Azure Application Gateway](../web-application-firewall/ag/ag-overview.md).
22+
* An Azure Application Gateway WAK SKU. For more information, see [Azure Web Application Firewall on Azure Application Gateway](../web-application-firewall/ag/ag-overview.md).
2123
* A Log Analytics workspace. For more information about creating a Log Analytics workspace, see [Create a Log Analytics workspace in the Azure portal](/azure/azure-monitor/logs/quick-create-workspace).
2224

23-
## Import WAF logs
25+
## Sending logs
2426

25-
To import your firewall logs into Log Analytics, see [Backend health, diagnostic logs, and metrics for Application Gateway](application-gateway-diagnostics.md#diagnostic-logging). When you have the firewall logs in your Log Analytics workspace, you can view data, write queries, create visualizations, and add them to your portal dashboard.
27+
To export your firewall logs into Log Analytics, see [Diagnostic logs for Application Gateway](application-gateway-diagnostics.md#firewall-log). When you have the firewall logs in your Log Analytics workspace, you can view data, write queries, create visualizations, and add them to your portal dashboard.
2628

2729
## Explore data with examples
2830

29-
To view the raw data in the firewall log, you can run the following query:
31+
When using **AzureDiagnostics** table, you can view the raw data in the firewall log by running the following query:
3032

3133
```
3234
AzureDiagnostics
3335
| where ResourceProvider == "MICROSOFT.NETWORK" and Category == "ApplicationGatewayFirewallLog"
36+
| limit 10
3437
```
3538

3639
This looks similar to the following query:
3740

3841
:::image type="content" source="media/log-analytics/log-query.png" alt-text="Screenshot of Log Analytics query." lightbox="media/log-analytics/log-query.png":::
3942

40-
You can drill down into the data, and plot graphs or create visualizations from here. See the following queries as a starting point:
43+
When using **Resource-specific** table, you can view the raw data in the firewall log by running the following query. To know about the resource-specific tables, visit [Monitoring data reference](monitor-application-gateway-reference.md#supported-resource-log-categories-for-microsoftnetworkapplicationgateways).
44+
45+
```
46+
AGWFirewallLogs
47+
| limit 10
48+
```
49+
50+
You can drill down into the data, and plot graphs or create visualizations from here. Here are some more examples of AzureDiagnostics queries that you can use.
4151

4252
### Matched/Blocked requests by IP
4353

0 commit comments

Comments
 (0)