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
description: Learn how to use Backend health report in Azure Application Gateway
5
+
services: application-gateway
6
+
author: jaesoni
7
+
ms.service: application-gateway
8
+
ms.topic: article
9
+
ms.date: 09/19/2023
10
+
ms.author: jaysoni
11
+
---
12
+
13
+
# Application Gateway - Backend health
14
+
15
+
Application Gateway health probes (default and custom) continuously monitor all the backend servers in a pool to ensure the incoming traffic is sent only to the servers that are up and running. These health checks enable a seamless data plane operation of a gateway. When a backend server can receive traffic, the probe is successful and considered healthy. Otherwise, it's considered unhealthy. The precise representation of the health probes report is also made available for your consumption through the Backend Health capability.
16
+
17
+
## Backend health report
18
+
The possible statuses for a server's health report are:
19
+
1. Healthy - Shows when the application gateway probes receive an expected response code from the backend server.
20
+
1. Unhealthy - Shows when probes don't receive a response, or the response doesn't match the expected response code or body.
21
+
1. Unknown - Occurs when the application gateway's control plane fails to communicate (for Backend Health call) with your application gateway instances or in case of [DNS resolution](application-gateway-backend-health-troubleshooting.md#updates-to-the-dns-entries-of-the-backend-pool) of the backend server's FQDN.
22
+
23
+
For complete information on the cause and solution of the Unhealthy and Unknown states, visit the [troubleshooting article](application-gateway-backend-health-troubleshooting.md).
24
+
25
+
> [!NOTE]
26
+
> The Backend health report is updated based on the respective probe's refresh interval and doesn't depend on the moment of page refresh or Backend health API request.
27
+
28
+
## Methods to view Backend health
29
+
The backend server health report can be generated through the Azure portal, REST API, PowerShell, and Azure CLI.
30
+
31
+
### Using Azure portal
32
+
The Application Gateway portal provides an information-rich backend health report with visualizations and tools for faster troubleshooting. Each row shows the exact target server, the backend pool it belongs to, its backend setting association (including port and protocol), and the response received by the latest probe. Visit the [Health Probes article](application-gateway-probe-overview.md) to understand how this report is composed based on the number of Backend pools, servers, and Backend settings.
33
+
34
+
For Unhealthy and Unknown statuses, you will also find a Troubleshoot link presenting you with the following tools:
35
+
36
+
1.**Azure Network Watcher's Connection troubleshoot** - Visit the [Connection Troubleshoot](../network-watcher/network-watcher-connectivity-portal.md) documentation article to learn how to use this tool.
37
+
1.**Backend server certificate visualization** - The Backend server certificate visualization makes it easy to understand the problem area, allowing you to act on the problem quickly. The three core components in the illustration provide you with a complete picture — The client, the Application Gateway, and the Backend Server. However, the problems explained in this troubleshooting section only focus on the TLS connection between the application gateway and the backend server.
38
+
39
+
:::image type="content" source="media/application-gateway-backend-health/backend-certificate-error.png" alt-text="Screenshot and explanation of a certificate error on the Backend Health page.":::
40
+
41
+
**Reading the illustration**
42
+
- The red lines indicate a problem with the TLS connection between the gateway and the backend server or the certificate components on the backend server.
43
+
- If there is red text in the Application Gateway or the Backend Server blocks, this indicates problems with the Backend Settings or the server certificate, respectively.
44
+
- You must act on the respective property (Application Gateway's Backend Setting or the Backend Server) depending on the error indication and location.
45
+
- A solution for each error type is provided. A documentation link is also provided for more information.
46
+
47
+
### Using PowerShell
48
+
49
+
The following PowerShell code shows how to view backend health by using the `Get-AzApplicationGatewayBackendHealth` cmdlet:
Copy file name to clipboardExpand all lines: articles/application-gateway/application-gateway-create-probe-portal.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -118,7 +118,7 @@ Now that the probe has been created, it's time to add it to the gateway. Probe s
118
118
119
119
## Next steps
120
120
121
-
View the health of the backend resources as determined by the probe using the [backend health view](./application-gateway-diagnostics.md#backend-health).
121
+
View the health of the backend servers as determined by the probe using the [Backend health view](application-gateway-backend-health.md).
Copy file name to clipboardExpand all lines: articles/application-gateway/application-gateway-diagnostics.md
+17-82Lines changed: 17 additions & 82 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,94 +1,24 @@
1
1
---
2
-
title: Backend health and diagnostic logs
2
+
title: Diagnostic logs
3
3
titleSuffix: Azure Application Gateway
4
-
description: Learn how to enable and manage access logs and performance logs for Azure Application Gateway
4
+
description: Learn how to enable and manage logs for Azure Application Gateway
5
5
services: application-gateway
6
6
author: greg-lindsay
7
7
ms.service: application-gateway
8
8
ms.topic: article
9
-
ms.date: 05/19/2023
9
+
ms.date: 09/19/2023
10
10
ms.author: greglin
11
11
---
12
12
13
-
# Backend health and diagnostic logs for Application Gateway
13
+
# Diagnostic logs for Application Gateway
14
14
15
-
You can monitor Azure Application Gateway resources in the following ways:
15
+
Application Gateway logs provide detailed information for events related to a resource and its operations. These logs are available for events such as Access, Activity, Firewall, and Performance (only for V1). The granular information in logs is helpful when troubleshooting a problem or building an analytics dashboard by consuming this raw data.
16
16
17
-
*[Backend health](#backend-health): Application Gateway provides the capability to monitor the health of the servers in the backend pools through the Azure portal and through PowerShell. You can also find the health of the backend pools through the performance diagnostic logs.
17
+
Logs are available for all resources of Application Gateway; however, to consume them, you must enable their collection in a storage location of your choice. Logging in Azure Application Gateway is enabled by the Azure Monitor service. We recommend using the Log Analytics workspace as you can readily use its predefined queries and set alerts based on specific log conditions.
18
18
19
-
*[Logs](#diagnostic-logging): Logs allow for performance, access, and other data to be saved or consumed from a resource for monitoring purposes.
19
+
## <aname="diagnostic-logging"></a>Types of Diagnostic logs
20
20
21
-
*[Metrics](application-gateway-metrics.md): Application Gateway has several metrics that help you verify your system is performing as expected.
Application Gateway provides the capability to monitor the health of individual members of the backend pools through the portal, PowerShell, and the command-line interface (CLI). You can also find an aggregated health summary of backend pools through the performance diagnostic logs.
28
-
29
-
The backend health report reflects the output of the Application Gateway health probe to the backend instances. When probing is successful and the back end can receive traffic, it's considered healthy. Otherwise, it's considered unhealthy.
30
-
31
-
> [!IMPORTANT]
32
-
> If there is a network security group (NSG) on an Application Gateway subnet, open port ranges 65503-65534 for v1 SKUs, and 65200-65535 for v2 SKUs on the Application Gateway subnet for inbound traffic. This port range is required for Azure infrastructure communication. They are protected (locked down) by Azure certificates. Without proper certificates, external entities, including the customers of those gateways, won't be able to initiate any changes on those endpoints.
33
-
34
-
35
-
### View backend health through the portal
36
-
37
-
In the portal, backend health is provided automatically. In an existing application gateway, select **Monitoring** > **Backend health**.
38
-
39
-
Each member in the backend pool is listed on this page (whether it's a NIC, IP, or FQDN). Backend pool name, port, backend HTTP settings name, and health status are shown. Valid values for health status are **Healthy**, **Unhealthy**, and **Unknown**.
40
-
41
-
> [!NOTE]
42
-
> If you see a backend health status of **Unknown**, ensure that access to the back end is not blocked by an NSG rule, a user-defined route (UDR), or a custom DNS in the virtual network.
43
-
44
-
![Backend health][10]
45
-
46
-
### View backend health through PowerShell
47
-
48
-
The following PowerShell code shows how to view backend health by using the `Get-AzApplicationGatewayBackendHealth` cmdlet:
You can use different types of logs in Azure to manage and troubleshoot application gateways. You can access some of these logs through the portal. All logs can be extracted from Azure Blob storage and viewed in different tools, such as [Azure Monitor logs](/previous-versions/azure/azure-monitor/insights/azure-networking-analytics), Excel, and Power BI. You can learn more about the different types of logs from the following list:
21
+
You can use different types of logs in Azure to manage and troubleshoot application gateways. You can learn more about these types below:
92
22
93
23
***Activity log**: You can use [Azure activity logs](../azure-monitor/essentials/activity-log.md) (formerly known as operational logs and audit logs) to view all operations that are submitted to your Azure subscription, and their status. Activity log entries are collected by default, and you can view them in the Azure portal.
94
24
***Access log**: You can use this log to view Application Gateway access patterns and analyze important information. This includes the caller's IP, requested URL, response latency, return code, and bytes in and out. An access log is collected every 60 seconds. This log contains one record per instance of Application Gateway. The Application Gateway instance is identified by the instanceId property.
@@ -98,11 +28,16 @@ You can use different types of logs in Azure to manage and troubleshoot applicat
98
28
> [!NOTE]
99
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.
100
30
101
-
You have three options for storing your logs:
31
+
## Storage locations
32
+
33
+
You have the following options to store the logs in your preferred location.
34
+
35
+
1.**Log Analytic workspace**: Recommended as it allows you to readily use the predefined queries, visualizations and set alerts based on specific log conditions.
36
+
1.**Azure Storage account**: Storage accounts are best used for logs when logs are stored for a longer duration and reviewed when needed.
37
+
1.**Azure Event Hubs**: Event hubs are a great option for integrating with other security information and event management (SIEM) tools to get alerts on your resources.
38
+
1.**Azure Monitor partner integrations**
102
39
103
-
***Storage account**: Storage accounts are best used for logs when logs are stored for a longer duration and reviewed when needed.
104
-
***Event hubs**: Event hubs are a great option for integrating with other security information and event management (SIEM) tools to get alerts on your resources.
105
-
***Azure Monitor logs**: Azure Monitor logs is best used for general real-time monitoring of your application or looking at trends.
40
+
[Learn more](../azure-monitor/essentials/diagnostic-settings.md?WT.mc_id=Portal-Microsoft_Azure_Monitoring&tabs=portal#destinations) about the Azure Monitor's Diagnostic settings destinations.
Copy file name to clipboardExpand all lines: articles/application-gateway/application-gateway-probe-overview.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ ms.author: greglin
10
10
ms.custom: devx-track-azurepowershell
11
11
---
12
12
13
-
# Application Gateway health monitoring overview
13
+
# Application Gateway health probes overview
14
14
15
15
Azure Application Gateway monitors the health of all the servers in its backend pool and automatically stops sending traffic to any server it considers unhealthy. The probes continue to monitor such an unhealthy server, and the gateway starts routing the traffic to it once again as soon as the probes detect it as healthy.
16
16
@@ -28,7 +28,7 @@ A gateway starts firing probes immediately after you configure a Rule by associa
28
28
29
29
:::image type="content" source="media/application-gateway-probe-overview/appgatewayprobe.png" alt-text="Diagram showing Application Gateway initiating health probes to individual backend targets within a backend pool":::
30
30
31
-
The required probes are determined based on the unique combination of the Backend Server and Backend Setting. For example, consider a gateway with a single backend pool with two servers and two backend settings, each having different port numbers. When these distinct backend settings are associated with the same backend pool using their respective rules, the gateway creates probes for each server and the combination of the backend setting. You can view this on the [Backend health page](./application-gateway-diagnostics.md#backend-health).
31
+
The required probes are determined based on the unique combination of the Backend Server and Backend Setting. For example, consider a gateway with a single backend pool with two servers and two backend settings, each having different port numbers. When these distinct backend settings are associated with the same backend pool using their respective rules, the gateway creates probes for each server and the combination of the backend setting. You can view this on the [Backend health page](application-gateway-backend-health.md).
32
32
33
33
:::image type="content" source="media/application-gateway-probe-overview/multiple-be-settings.png" alt-text="Diagram showing health probes report on the Backend Health page":::
Once the match criteria is specified, it can be attached to probe configuration using a `-Match`parameter in PowerShell.
100
+
Match criteria can be attached to probe configuration using a `-Match`operator in PowerShell.
101
101
102
102
### Some use cases for Custom probes
103
103
- If a backend server allows access to only authenticated users, the application gateway probes will receive a 403 response code instead of 200. As the clients (users) are bound to authenticate themselves for the live traffic, you can configure the probe traffic to accept 403 as an expected response.
Copy file name to clipboardExpand all lines: articles/application-gateway/configuration-infrastructure.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -149,7 +149,7 @@ Fine grain control over the Application Gateway subnet via Route Table rules is
149
149
With current functionality there are some restrictions:
150
150
151
151
> [!IMPORTANT]
152
-
> Using UDRs on the Application Gateway subnet might cause the health status in the [backend health view](./application-gateway-diagnostics.md#backend-health) to appear as **Unknown**. It also might cause generation of Application Gateway logs and metrics to fail. We recommend that you don't use UDRs on the Application Gateway subnet so that you can view the backend health, logs, and metrics.
152
+
> Using UDRs on the Application Gateway subnet might cause the health status in the [backend health view](application-gateway-backend-health.md) to appear as **Unknown**. It also might cause generation of Application Gateway logs and metrics to fail. We recommend that you don't use UDRs on the Application Gateway subnet so that you can view the backend health, logs, and metrics.
0 commit comments