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/azure-monitor/autoscale/autoscale-custom-metric.md
+16-16Lines changed: 16 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,15 +6,15 @@ ms.author: edbaynash
6
6
ms.service: azure-monitor
7
7
ms.subservice: autoscale
8
8
ms.topic: how-to
9
-
ms.date: 07/09/2023
9
+
ms.date: 08/07/2024
10
10
ms.reviewer: akkumari
11
11
12
12
# Customer intent: As a user or dev ops administrator, I want to use the portal to set up autoscale so I can scale my resources.
13
13
14
14
---
15
15
# Autoscale a web app by using custom metrics
16
16
17
-
This article describes how to set up autoscale for a web app by using a custom metric in the Azure portal.
17
+
This article takes you through how to set up autoscale for a web app by using a custom metric in the Azure portal.
18
18
19
19
Autoscale allows you to add and remove resources to handle increases and decreases in load. In this article, we'll show you how to set up autoscale for a web app by using one of the Application Insights metrics to scale the web app in and out.
20
20
@@ -31,7 +31,7 @@ Azure Monitor autoscale applies to:
31
31
32
32
## Prerequisite
33
33
34
-
You need an Azure account with an active subscription. You can [create an account for free](https://azure.microsoft.com/free).
34
+
You must have an Azure account with an active subscription. You can [create an account for free](https://azure.microsoft.com/free).
35
35
36
36
## Overview
37
37
@@ -48,7 +48,7 @@ An App Service plan defines a set of compute resources for a web app to run on.
48
48
1. Open the [Azure portal](https://portal.azure.com).
49
49
1. Search for and select **App Service plans**.
50
50
51
-
:::image type="content" source="media\autoscale-custom-metric\search-app-service-plan.png" alt-text="Screenshot that shows searching for App Service plans.":::
51
+
:::image type="content" source="media\autoscale-custom-metric\search-app-service-plan.png" lightbox="media\autoscale-custom-metric\search-app-service-plan.png" alt-text="Screenshot that shows searching for App Service plans.":::
52
52
53
53
1. On the **App Service plan** page, select **Create**.
54
54
1. Select a **Resource group** or create a new one.
@@ -61,26 +61,26 @@ An App Service plan defines a set of compute resources for a web app to run on.
61
61
62
62
1. Select **Review + create** > **Create**.
63
63
64
-
:::image type="content" source="media\autoscale-custom-metric\create-app-service-plan.png" alt-text="Screenshot that shows the Basics tab of the Create App Service Plan screen on which you configure the App Service plan.":::
64
+
:::image type="content" source="media\autoscale-custom-metric\create-app-service-plan.png" lightbox="media\autoscale-custom-metric\create-app-service-plan.png" alt-text="Screenshot that shows the Basics tab of the Create App Service Plan screen on which you configure the App Service plan.":::
65
65
66
66
## Create a web app
67
67
68
68
1. Search for and select **App services**.
69
69
70
-
:::image type="content" source="media\autoscale-custom-metric\search-app-services.png" alt-text="Screenshot that shows searching for App Services.":::
70
+
:::image type="content" source="media\autoscale-custom-metric\search-app-services.png" lightbox="media\autoscale-custom-metric\search-app-services.png" alt-text="Screenshot that shows searching for App Services.":::
71
71
72
72
1. On the **App Services** page, select **Create**.
73
73
1. On the **Basics** tab, enter a **Name** and select a **Runtime stack**.
74
74
1. Select the **Operating System** and **Region** that you chose when you defined your App Service plan.
75
75
1. Select the **App Service plan** that you created earlier.
76
76
1. Select the **Monitoring** tab.
77
77
78
-
:::image type="content" source="media\autoscale-custom-metric\create-web-app.png" alt-text="Screenshot that shows the Basics tab of the Create Web App page where you set up a web app.":::
78
+
:::image type="content" source="media\autoscale-custom-metric\create-web-app.png" lightbox="media\autoscale-custom-metric\create-web-app.png" alt-text="Screenshot that shows the Basics tab of the Create Web App page where you set up a web app.":::
79
79
80
80
1. On the **Monitoring** tab, select **Yes** to enable Application Insights.
81
81
1. Select **Review + create** > **Create**.
82
82
83
-
:::image type="content" source="media\autoscale-custom-metric\enable-application-insights.png"alt-text="Screenshot that shows the Monitoring tab of the Create Web App page where you enable Application Insights.":::
83
+
:::image type="content" source="media\autoscale-custom-metric\enable-application-insights.png" lightbox="media\autoscale-custom-metric\enable-application-insights.png" alt-text="Screenshot that shows the Monitoring tab of the Create Web App page where you enable Application Insights.":::
84
84
85
85
## Configure autoscale
86
86
@@ -89,7 +89,7 @@ Configure the autoscale settings for your App Service plan.
89
89
1. Search and select **autoscale** in the search bar or select **Autoscale** under **Monitor** in the menu bar on the left.
90
90
1. Select your App Service plan. You can only configure production plans.
91
91
92
-
:::image type="content" source="media\autoscale-custom-metric\autoscale-overview-page.png" alt-text="Screenshot that shows the Autoscale page where you select the resource to set up autoscale.":::
92
+
:::image type="content" source="media\autoscale-custom-metric\autoscale-overview-page.png" lightbox="media\autoscale-custom-metric\autoscale-overview-page.png" alt-text="Screenshot that shows the Autoscale page where you select the resource to set up autoscale.":::
93
93
94
94
### Set up a scale-out rule
95
95
@@ -98,7 +98,7 @@ Set up a scale-out rule so that Azure spins up another instance of the web app w
98
98
1. Select **Custom autoscale**.
99
99
1. In the **Rules** section of the default scale condition, select **Add a rule**.
100
100
101
-
:::image type="content" source="media/autoscale-custom-metric/autoscale-settings.png" alt-text="Screenshot that shows the Autoscale setting page where you set up the basic autoscale settings.":::
101
+
:::image type="content" source="media/autoscale-custom-metric/autoscale-settings.png" lightbox="media/autoscale-custom-metric/autoscale-settings.png" alt-text="Screenshot that shows the Autoscale setting page where you set up the basic autoscale settings.":::
102
102
103
103
1. From the **Metric source** dropdown, select **Other resource**.
104
104
1. From **Resource type**, select **Application Insights**.
@@ -110,7 +110,7 @@ Set up a scale-out rule so that Azure spins up another instance of the web app w
110
110
1. Under **Action**, set **Operation** to **Increase count by**. Set **Instance count** to **1**.
111
111
1. Select **Add**.
112
112
113
-
:::image type="content" source="media/autoscale-custom-metric/scale-out-rule.png" alt-text="Screenshot that shows the Scale rule page where you configure the scale-out rule.":::
113
+
:::image type="content" source="media/autoscale-custom-metric/scale-out-rule.png" lightbox="media/autoscale-custom-metric/scale-out-rule.png" alt-text="Screenshot that shows the Scale rule page where you configure the scale-out rule.":::
114
114
115
115
### Set up a scale-in rule
116
116
@@ -127,28 +127,28 @@ Set up a scale-in rule so that Azure spins down one of the instances when the nu
127
127
1. Under **Action**, set **Operation** to **Decrease count by** and set **Instance count** to **1**.
128
128
1. Select **Add**.
129
129
130
-
:::image type="content" source="media/autoscale-custom-metric/scale-in-rule.png" alt-text="Screenshot that shows the Scale rule page where you configure the scale-in rule.":::
130
+
:::image type="content" source="media/autoscale-custom-metric/scale-in-rule.png" lightbox="media/autoscale-custom-metric/scale-in-rule.png" alt-text="Screenshot that shows the Scale rule page where you configure the scale-in rule.":::
131
131
132
132
### Limit the number of instances
133
133
134
134
1. Set the maximum number of instances that can be spun up in the **Maximum** field of the **Instance limits** section. For example, use **4**.
135
135
1. Select **Save**.
136
136
137
-
:::image type="content" source="media/autoscale-custom-metric/autoscale-instance-limits.png" alt-text="Screenshot that shows the Autoscale setting page where you set up instance limits.":::
137
+
:::image type="content" source="media/autoscale-custom-metric/autoscale-instance-limits.png" lightbox="media/autoscale-custom-metric/autoscale-instance-limits.png" alt-text="Screenshot that shows the Autoscale setting page where you set up instance limits.":::
138
138
139
139
## Clean up resources
140
140
141
141
If you're not going to continue to use this application, delete resources.
142
142
143
143
1. On the App Service overview page, select **Delete**.
144
144
145
-
:::image type="content" source="media/autoscale-custom-metric/delete-web-app.png" alt-text="Screenshot that shows the App Service page where you can delete the web app.":::
145
+
:::image type="content" source="media/autoscale-custom-metric/delete-web-app.png" lightbox="media/autoscale-custom-metric/delete-web-app.png" alt-text="Screenshot that shows the App Service page where you can delete the web app.":::
146
146
147
-
1. On the **Autoscale setting** page, in the **JSON** tab, select the trash bin icon next to the **Autoscale setting name**. Note that the autoscale settings are not deleted along with the App Service plan unless you delete the resource group. If you dont delete the Autoscale settings and you recreate an app service plan with the same name, it will inherit the original autoscale settings.
147
+
1. On the **Autoscale setting** page, in the **JSON** tab, select the trash bin icon next to the **Autoscale setting name**. Note that the autoscale settings aren't deleted along with the App Service plan unless you delete the resource group. If you don't delete the Autoscale settings and you recreate an app service plan with the same name, it inherits the original autoscale settings.
148
148
149
149
1. On the **App Service plans** page, select **Delete**.
150
150
151
-
:::image type="content" source="media/autoscale-custom-metric/delete-service-plan.png" alt-text="Screenshot that shows the App Service plans page where you can delete the App Service plan.":::
151
+
:::image type="content" source="media/autoscale-custom-metric/delete-service-plan.png" lightbox="media/autoscale-custom-metric/delete-service-plan.png" alt-text="Screenshot that shows the App Service plans page where you can delete the App Service plan.":::
0 commit comments