You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/application-gateway/application-gateway-diagnostics.md
+36-6Lines changed: 36 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ services: application-gateway
6
6
author: greg-lindsay
7
7
ms.service: application-gateway
8
8
ms.topic: article
9
-
ms.date: 11/18/2023
9
+
ms.date: 01/10/2024
10
10
ms.author: greglin
11
11
---
12
12
@@ -26,7 +26,7 @@ You can use different types of logs in Azure to manage and troubleshoot applicat
26
26
***Firewall log**: You can use this log to view the requests that are logged through either detection or prevention mode of an application gateway that is configured with the web application firewall. Firewall logs are collected every 60 seconds.
27
27
28
28
> [!NOTE]
29
-
> Logs are available only for resources deployed in the Azure Resource Manager deployment model. You cannot use logs for resources in the classic deployment model. For a better understanding of the two models, see the [Understanding Resource Manager deployment and classic deployment](../azure-resource-manager/management/deployment-models.md) article.
29
+
> Logs are available only for resources deployed in the Azure Resource Manager deployment model. You can't use logs for resources in the classic deployment model. For a better understanding of the two models, see the [Understanding Resource Manager deployment and classic deployment](../azure-resource-manager/management/deployment-models.md) article.
30
30
31
31
## Storage locations
32
32
@@ -117,7 +117,11 @@ The access log is generated only if you've enabled it on each Application Gatewa
117
117
|originalRequestUriWithArgs| This field contains the original request URL |
118
118
|requestUri| This field contains the URL after the rewrite operation on Application Gateway |
119
119
|upstreamSourcePort| The source port used by Application Gateway when initiating a connection to the backend target|
120
-
|originalHost| This field contains the original request host name
120
+
|originalHost| This field contains the original request host name|
121
+
|error_info|The reason for the 4xx and 5xx error. Displays an error code for a failed request. More details in [Error code information.](./application-gateway-diagnostics.md#error-code-information) |
122
+
|contentType|The type of content or data that is being processed or delivered by the application gateway
123
+
124
+
121
125
```json
122
126
{
123
127
"timeStamp": "2021-10-14T22:17:11+00:00",
@@ -157,7 +161,9 @@ The access log is generated only if you've enabled it on each Application Gatewa
157
161
"serverResponseLatency": "0.028",
158
162
"upstreamSourcePort": "21564",
159
163
"originalHost": "20.110.30.194",
160
-
"host": "20.110.30.194"
164
+
"host": "20.110.30.194",
165
+
"error_info":"ERRORINFO_NO_ERROR",
166
+
"contentType":"application/json"
161
167
}
162
168
}
163
169
```
@@ -181,8 +187,8 @@ The access log is generated only if you've enabled it on each Application Gatewa
181
187
|sentBytes| Size of packet sent, in bytes.|
182
188
|timeTaken| Length of time (in milliseconds) that it takes for a request to be processed and its response to be sent. This is calculated as the interval from the time when Application Gateway receives the first byte of an HTTP request to the time when the response send operation finishes. It's important to note that the Time-Taken field usually includes the time that the request and response packets are traveling over the network. |
183
189
|sslEnabled| Whether communication to the backend pools used TLS/SSL. Valid values are on and off.|
184
-
|host| The hostname with which the request has been sent to the backend server. If backend hostname is being overridden, this name reflects that.|
185
-
|originalHost| The hostname with which the request was received by the Application Gateway from the client.|
190
+
|host| The hostname for which the request has been sent to the backend server. If backend hostname is being overridden, this name reflects that.|
191
+
|originalHost| The hostname for which the request was received by the Application Gateway from the client.|
186
192
187
193
```json
188
194
{
@@ -209,7 +215,31 @@ The access log is generated only if you've enabled it on each Application Gatewa
209
215
}
210
216
}
211
217
```
218
+
### Error code Information
219
+
If the application gateway can't complete the request, it stores one of the following reason codes in the error_info field of the access log.
220
+
212
221
222
+
|4XX Errors |The 4xx error codes indicate that there was an issue with the client's request, and the server can't fulfill it |
223
+
|---------|---------|
224
+
| ERRORINFO_INVALID_METHOD| The client has sent a request which is non-RFC compliant. Possible reasons: client using HTTP method not supported by server, misspelled method, incompatible HTTP protocol version etc.|
225
+
| ERRORINFO_INVALID_REQUEST | The server can't fulfill the request because of incorrect syntax.|
226
+
| ERRORINFO_INVALID_VERSION| The application gateway received a request with an invalid or unsupported HTTP version.|
227
+
| ERRORINFO_INVALID_09_METHOD| The client sent request with HTTP Protocol version 0.9.|
228
+
| ERRORINFO_INVALID_HOST |The value provided in the "Host" header is either missing, improperly formatted, or doesn't match the expected host value (when there is no Basic listener, and none of the hostnames of Multisite listeners match with the host).|
229
+
| ERRORINFO_INVALID_CONTENT_LENGTH | The length of the content specified by the client in the content-Length header doesn't match the actual length of the content in the request.|
230
+
| ERRORINFO_INVALID_METHOD_TRACE | The client sent HTTP TRACE method which is not supported by the application gateway.|
231
+
| ERRORINFO_CLIENT_CLOSED_REQUEST | The client closed the connection with the application gateway before the idle timeout period elapsed.Check whether the client timeout period is greater than the [idle timeout period](./application-gateway-faq.yml#what-are-the-settings-for-keep-alive-timeout-and-tcp-idle-timeout) for the application gateway.|
232
+
| ERRORINFO_REQUEST_URI_INVALID |Indicates issue with the Uniform Resource Identifier (URI) provided in the client's request. |
233
+
| ERRORINFO_HTTP_NO_HOST_HEADER | Client sent a request without Host header. |
234
+
| ERRORINFO_HTTP_TO_HTTPS_PORT |The client sent a plain HTTP request to an HTTPS port. |
235
+
| ERRORINFO_HTTPS_NO_CERT | Indicates client is not sending a valid and properly configured TLS certificate during Mutual TLS authentication. |
236
+
237
+
238
+
|5XX Errors |Description |
239
+
|---------|---------|
240
+
| ERRORINFO_UPSTREAM_NO_LIVE | The application gateway is unable to find any active or reachable backend servers to handle incoming requests |
241
+
| ERRORINFO_UPSTREAM_CLOSED_CONNECTION | The backend server closed the connection unexpectedly or before the request was fully processed. This could happen due to backend server reaching its limits, crashing etc.|
242
+
| ERRORINFO_UPSTREAM_TIMED_OUT | The established TCP connection with the server was closed as the connection took longer than the configured timeout value. |
213
243
### Performance log
214
244
215
245
The performance log is generated only if you have enabled it on each Application Gateway instance, as detailed in the preceding steps. The data is stored in the storage account that you specified when you enabled the logging. The performance log data is generated in 1-minute intervals. It is available only for the v1 SKU. For the v2 SKU, use [Metrics](application-gateway-metrics.md) for performance data. The following data is logged:
0 commit comments