Skip to content

Commit 53e66a3

Browse files
authored
Merge pull request #92642 from abshamsft/health-probe-enhancements
Changes with the on-demand health probe release
2 parents 631ebda + bfab44d commit 53e66a3

File tree

4 files changed

+72
-19
lines changed

4 files changed

+72
-19
lines changed
Lines changed: 72 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Create a custom probe - Azure Application Gateway - Azure Portal | Microsoft Docs
2+
title: Create a custom probe - Azure Application Gateway - Azure portal | Microsoft Docs
33
description: Learn how to create a custom probe for Application Gateway by using the portal
44
services: application-gateway
55
documentationcenter: na
@@ -14,7 +14,7 @@ ms.devlang: na
1414
ms.topic: article
1515
ms.tgt_pltfrm: na
1616
ms.workload: infrastructure-services
17-
ms.date: 04/26/2017
17+
ms.date: 10/14/2019
1818
ms.author: victorh
1919

2020
---
@@ -25,56 +25,109 @@ ms.author: victorh
2525
> * [Azure Resource Manager PowerShell](application-gateway-create-probe-ps.md)
2626
> * [Azure Classic PowerShell](application-gateway-create-probe-classic-ps.md)
2727
28-
In this article, you add a custom probe to an existing application gateway through the Azure portal. Custom probes are useful for applications that have a specific health check page or for applications that do not provide a successful response on the default web application.
28+
In this article, you add a custom health probe to an existing application gateway through the Azure portal. Using the health probes, Azure Application Gateway monitors the health of the resources in the back-end pool.
2929

3030
## Before you begin
3131

3232
If you do not already have an application gateway, visit [Create an Application Gateway](application-gateway-create-gateway-portal.md) to create an application gateway to work with.
3333

34-
## <a name="createprobe"></a>Create the probe
34+
## Create probe for Application Gateway v2 SKU
35+
36+
Probes are configured in a two-step process through the portal. The first step is to enter the values required for the probe configuration. In the second step, you test the backend health using this probe configuration and save the probe.
37+
38+
### <a name="createprobe"></a>Enter probe properties
39+
40+
1. Sign in to the [Azure portal](https://portal.azure.com). If you don't already have an account, you can sign up for a [free one-month trial](https://azure.microsoft.com/free)
41+
42+
2. In the Azure portal Favorites pane, click All resources. Click the application gateway in the All resources blade. If the subscription you selected already has several resources in it, you can enter partners.contoso.net in the Filter by name… box to easily access the application gateway.
43+
44+
3. Select **Health probes** and then select **Add** to add a new health probe.
45+
46+
![Add new probe][4]
47+
48+
4. On the **Add health probe** page, fill out the required information for the probe, and when complete select **OK**.
49+
50+
|**Setting** | **Value** | **Details**|
51+
|---|---|---|
52+
|**Name**|customProbe|This value is a friendly name given to the probe that is accessible in the portal.|
53+
|**Protocol**|HTTP or HTTPS | The protocol that the health probe uses. |
54+
|**Host**|i.e contoso.com|This value is the name of the virtual host (different from the VM host name) running on the application server. The probe is sent to (protocol)://(host name):(port from httpsetting)/urlPath. This is applicable when multi-site is configured on Application Gateway. If the Application Gateway is configured for a single site, then enter '127.0.0.1'.|
55+
|**Pick host name from backend HTTP settings**|Yes or No|Sets the *host* header in the probe to the host name of the back-end resource in the back-end pool associated with the HTTP Setting to which this probe is associated to. Specially required in case of multi-tenant backends such as Azure app service. [Learn more](https://docs.microsoft.com/azure/application-gateway/configuration-overview#pick-host-name-from-back-end-address)|
56+
|**Path**|/ or another path|The remainder of the full url for the custom probe. A valid path starts with '/'. For the default path of http:\//contoso.com just use '/' |
57+
|**Interval (secs)**|30|How often the probe is run to check for health. It is not recommended to set the lower than 30 seconds.|
58+
|**Timeout (secs)**|30|The amount of time the probe waits before timing out. If a valid response is not received within this time-out period, the probe is marked as failed. The timeout interval needs to be high enough that an http call can be made to ensure the backend health page is available. Note that the time-out value should not be more than the ‘Interval’ value used in this probe setting or the ‘Request timeout’ value in the HTTP setting which will be associated with this probe.|
59+
|**Unhealthy threshold**|3|Number of consecutive failed attempts to be considered unhealthy. The threshold can be set to 1 or more.|
60+
|**Use probe matching conditions**|Yes or No|By default, an HTTP(S) response with status code between 200 and 399 is considered healthy. You can change the acceptable range of backend response code or backend response body. [Learn more](https://docs.microsoft.com/azure/application-gateway/application-gateway-probe-overview#probe-matching)|
61+
|**HTTP Settings**|selection from dropdown|Probe will get associated with the HTTP setting(s) selected here and therefore, will monitor the health of that backend pool which is associated with the selected HTTP setting. It will use the same port for the probe request as the one being used in the selected HTTP setting. You can only choose those HTTP setting(s) which are not associated with any other custom probe. <br>Note that only those HTTP setting(s) are available for association which have the same protocol as the protocol chosen in this probe configuration and have the same state for the *Pick Host Name From Backend HTTP setting* switch.|
62+
63+
> [!IMPORTANT]
64+
> The probe will monitor health of the backend only when it is associated with one or more HTTP Setting(s). It will monitor back-end resources of those back-end pools which are associated to the HTTP setting(s) to which this probe is associated with. The probe request will be sent to http://(host name):(port from httpsetting)/urlPath.
65+
66+
### Test backend health with the probe
67+
68+
After entering the probe properties, you can test the health of the back-end resources to verify that the probe configuration is correct and that the back-end resources are working as expected.
69+
70+
1. Select **Test** and note the result of the probe. The Application gateway tests the health of all the backend resources in the backend pools associated with the HTTP Setting(s) used for this probe.
71+
72+
![Test backend health][5]
73+
74+
2. If there are any unhealthy backend resources, then check the **Details** column to understand the reason for unhealthy state of the resource. If the resource has been marked unhealthy due to an incorrect probe configuration, then select the **Go back to probe** link and edit the probe configuration. Otherwise, if the resource has been marked unhealthy due to an issue with the backend, then resolve the issues with the backend resource and then test the backend again by selecting the **Go back to probe** link and select **Test**.
75+
76+
> [!NOTE]
77+
> You can choose to save the probe even with unhealthy backend resources, but it is not recommended. This is because the Application Gateway removes those backend resources from the backend pool which are determined to be unhealthy by the probe. In case there are no healthy resources in a backend pool, you will not be able to access your application and will get a 502 error.
78+
79+
![View probe result][6]
80+
81+
3. Select **Add** to save the probe.
82+
83+
## Create probe for Application Gateway v1 SKU
3584

3685
Probes are configured in a two-step process through the portal. The first step is to create the probe. In the second step, you add the probe to the backend http settings of the application gateway.
3786

38-
1. Log in to the [Azure portal](https://portal.azure.com). If you don't already have an account, you can sign up for a [free one-month trial](https://azure.microsoft.com/free)
87+
### <a name="createprobe"></a>Create the probe
3988

40-
1. In the Azure portal Favorites pane, click All resources. Click the application gateway in the All resources blade. If the subscription you selected already has several resources in it, you can enter partners.contoso.net in the Filter by name… box to easily access the application gateway.
89+
1. Sign in to the [Azure portal](https://portal.azure.com). If you don't already have an account, you can sign up for a [free one-month trial](https://azure.microsoft.com/free)
4190

42-
1. Click **Probes** and click the **Add** button to add a probe.
91+
2. In the Azure portal Favorites pane, select **All resources**. Select the application gateway in the **All resources** page. If the subscription you selected already has several resources in it, you can enter partners.contoso.net in the Filter by name… box to easily access the application gateway.
92+
93+
3. Select **Probes** and then select **Add** to add a probe.
4394

4495
![Add Probe blade with information filled out][1]
4596

46-
1. On the **Add health probe** blade, fill out the required information for the probe, and when complete click **OK**.
97+
4. On the **Add health probe** blade, fill out the required information for the probe, and when complete select **OK**.
4798

4899
|**Setting** | **Value** | **Details**|
49100
|---|---|---|
50-
|**Name**|customProbe|This value is a friendly name to the probe that is accessible in the portal.|
51-
|**Protocol**|HTTP or HTTPS | The protocol that the health probe uses.|
52-
|**Host**|i.e contoso.com|This value is the host name that is used for the probe. Applicable only when multi-site is configured on Application Gateway, otherwise use '127.0.0.1'. This value is different from the VM host name.|
101+
|**Name**|customProbe|This value is a friendly name given to the probe that is accessible in the portal.|
102+
|**Protocol**|HTTP or HTTPS | The protocol that the health probe uses. |
103+
|**Host**|i.e contoso.com|This value is the name of the virtual host (different from the VM host name) running on the application server. The probe is sent to (protocol)://(host name):(port from httpsetting)/urlPath. This is applicable when multi-site is configured on Application Gateway. If the Application Gateway is configured for a single site, then enter '127.0.0.1'.|
104+
|**Pick host name from backend HTTP settings**|Yes or No|Sets the *host* header in the probe to the host name of the back-end resource in the back-end pool associated with the HTTP Setting to which this probe is associated to. Specially required in case of multi-tenant backends such as Azure app service. [Learn more](https://docs.microsoft.com/azure/application-gateway/configuration-overview#pick-host-name-from-back-end-address)|
53105
|**Path**|/ or another path|The remainder of the full url for the custom probe. A valid path starts with '/'. For the default path of http:\//contoso.com just use '/' |
54106
|**Interval (secs)**|30|How often the probe is run to check for health. It is not recommended to set the lower than 30 seconds.|
55-
|**Timeout (secs)**|30|The amount of time the probe waits before timing out. The timeout interval needs to be high enough that an http call can be made to ensure the backend health page is available.|
56-
|**Unhealthy threshold**|3|Number of failed attempts to be considered unhealthy. The threshold can be set to 1 or more.|
107+
|**Timeout (secs)**|30|The amount of time the probe waits before timing out. If a valid response is not received within this time-out period, the probe is marked as failed. The timeout interval needs to be high enough that an http call can be made to ensure the backend health page is available. Note that the time-out value should not be more than the ‘Interval’ value used in this probe setting or the ‘Request timeout’ value in the HTTP setting which will be associated with this probe.|
108+
|**Unhealthy threshold**|3|Number of consecutive failed attempts to be considered unhealthy. The threshold can be set to 1 or more.|
109+
|**Use probe matching conditions**|Yes or No|By default, an HTTP(S) response with status code between 200 and 399 is considered healthy. You can change the acceptable range of backend response code or backend response body. [Learn more](https://docs.microsoft.com/azure/application-gateway/application-gateway-probe-overview#probe-matching)|
57110

58111
> [!IMPORTANT]
59112
> The host name is not the same as server name. This value is the name of the virtual host running on the application server. The probe is sent to http://(host name):(port from httpsetting)/urlPath
60113
61-
## Add probe to the gateway
114+
### Add probe to the gateway
62115

63116
Now that the probe has been created, it is time to add it to the gateway. Probe settings are set on the backend http settings of the application gateway.
64117

65118
1. Click **HTTP settings** on the application gateway, to bring up the configuration blade click the current backend http settings listed in the window.
66119

67120
![https settings window][2]
68121

69-
1. On the **appGatewayBackEndHttpSettings** settings blade, check the **Use custom probe** checkbox and choose the probe created in the [Create the probe](#createprobe) section on the **Custom probe** drop-down..
122+
2. On the **appGatewayBackEndHttpSettings** settings page, check the **Use custom probe** checkbox and choose the probe created in the [Create the probe](#createprobe) section on the **Custom probe** drop-down.
70123
When complete, click **Save** and the settings are applied.
71124

72-
The default probe checks the default access to the web application. Now that a custom probe has been created, the application gateway uses the custom path defined to monitor health for the backend servers. Based on the criteria that was defined, the application gateway checks the path specified in the probe. If the call to host:Port/path does not return an HTTP 200-399 status response, the server is taken out of rotation after the unhealthy threshold is reached. Probing continues on the unhealthy instance to determine when it becomes healthy again. Once the instance is added back to healthy server pool, traffic begins flowing to it again and probing to the instance continues at user specified interval as normal.
73-
74125
## Next steps
75126

76-
To learn how to configure SSL Offloading with Azure Application Gateway, see [Configure SSL Offload](application-gateway-ssl-portal.md)
127+
View the health of the backend resources as determined by the probe using the [backend health view](https://docs.microsoft.com/azure/application-gateway/application-gateway-diagnostics#back-end-health).
77128

78129
[1]: ./media/application-gateway-create-probe-portal/figure1.png
79130
[2]: ./media/application-gateway-create-probe-portal/figure2.png
80-
131+
[4]: ./media/application-gateway-create-probe-portal/figure4.png
132+
[5]: ./media/application-gateway-create-probe-portal/figure5.png
133+
[6]: ./media/application-gateway-create-probe-portal/figure6.png
43.4 KB
Loading
83.7 KB
Loading
96.2 KB
Loading

0 commit comments

Comments
 (0)