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
Azure Monitor autoscaling allows you to scale the number of running instances up or down, based on telemetry data (metrics). This article describes common metrics that you might want to use. In the Azure portal, you can choose the metric of the resource to scale by. You can also choose any metric from a different resource to scale by.
16
+
Azure Monitor autoscaling allows you to scale the number of running instances up or down, based on telemetry data, also known as metrics. This article describes common metrics that you might want to use. In the Azure portal, you can choose the metric of the resource to scale by. You can also choose any metric from a different resource to scale by.
17
17
18
-
Azure Monitor autoscale applies only to [Azure Virtual Machine Scale Sets](https://azure.microsoft.com/services/virtual-machine-scale-sets/), [Azure Cloud Services](https://azure.microsoft.com/services/cloud-services/), [Azure App Service - Web Apps](https://azure.microsoft.com/services/app-service/web/), and [Azure API Management services](../../api-management/api-management-key-concepts.md). Other Azure services use different scaling methods.
18
+
Azure Monitor autoscale applies only to [Azure Virtual Machine Scale Sets](https://azure.microsoft.com/services/virtual-machine-scale-sets/), [Azure Cloud Services](https://azure.microsoft.com/services/cloud-services/), [Azure App Service - Web Apps](https://azure.microsoft.com/services/app-service/web/), and [Azure API Management](../../api-management/api-management-key-concepts.md). Other Azure services use different scaling methods.
19
19
20
20
## Compute metrics for Resource Manager-based VMs
21
21
22
-
By default, Azure Resource Manager-based virtual machines and Virtual Machine Scale Sets emit basic (host-level) metrics. In addition, when you configure diagnostics data collection for an Azure VM and Virtual Machine Scale Sets, the Azure diagnostic extension also emits guest-OS performance counters (commonly known as "guest-OS metrics"). You use all these metrics in autoscale rules.
22
+
By default, Azure Resource Manager-based virtual machines and virtual machine scale sets emit basic (host-level) metrics. In addition, when you configure diagnostics data collection for an Azure VM and virtual machine scale sets, the Azure Diagnostics extension also emits guest-OS performance counters. These counters are commonly known as "guest-OS metrics." You use all these metrics in autoscale rules.
23
23
24
24
You can use the `Get MetricDefinitions` API/PoSH/CLI to view the metrics available for your Virtual Machine Scale Sets resource.
25
25
26
-
If you're using virtual machine scale sets and you don't see a particular metric listed, it's likely *disabled* in your diagnostics extension.
26
+
If you're using virtual machine scale sets and you don't see a particular metric listed, it's likely *disabled* in your Diagnostics extension.
27
27
28
28
If a particular metric isn't being sampled or transferred at the frequency you want, you can update the diagnostics configuration.
29
29
30
30
If either preceding case is true, see [Use PowerShell to enable Azure Diagnostics in a virtual machine running Windows](../../virtual-machines/extensions/diagnostics-windows.md) to configure and update your Azure VM Diagnostics extension to enable the metric. The article also includes a sample diagnostics configuration file.
31
31
32
32
### Host metrics for Resource Manager-based Windows and Linux VMs
33
33
34
-
The following host-level metrics are emitted by default for Azure VM and Virtual Machine Scale Sets in both Windows and Linux instances. These metrics describe your Azure VM, but are collected from the Azure VM host rather than via agent installed on the guest VM. You may use these metrics in autoscaling rules.
34
+
The following host-level metrics are emitted by default for Azure VM and virtual machine scale sets in both Windows and Linux instances. These metrics describe your Azure VM but are collected from the Azure VM host rather than via agent installed on the guest VM. You can use these metrics in autoscaling rules.
35
35
36
36
-[Host metrics for Resource Manager-based Windows and Linux VMs](../essentials/metrics-supported.md#microsoftcomputevirtualmachines)
37
-
-[Host metrics for Resource Manager-based Windows and Linux Virtual Machine Scale Sets](../essentials/metrics-supported.md#microsoftcomputevirtualmachinescalesets)
37
+
-[Host metrics for Resource Manager-based Windows and Linux virtual machine scale sets](../essentials/metrics-supported.md#microsoftcomputevirtualmachinescalesets)
38
38
39
39
### Guest OS metrics for Resource Manager-based Windows VMs
40
40
41
-
When you create a VM in Azure, diagnostics is enabled by using the Diagnostics extension. The diagnostics extension emits a set of metrics taken from inside of the VM. This means you can autoscale off of metrics that aren't emitted by default.
41
+
When you create a VM in Azure, diagnostics is enabled by using the Diagnostics extension. The Diagnostics extension emits a set of metrics taken from inside of the VM. This means you can autoscale off of metrics that aren't emitted by default.
42
42
43
43
You can generate a list of the metrics by using the following command in PowerShell.
44
44
@@ -80,7 +80,7 @@ You can create an alert for the following metrics:
80
80
81
81
### Guest OS metrics Linux VMs
82
82
83
-
When you create a VM in Azure, diagnostics is enabled by default by using Diagnostics extension.
83
+
When you create a VM in Azure, diagnostics is enabled by default by using the Diagnostics extension.
84
84
85
85
You can generate a list of the metrics by using the following command in PowerShell.
86
86
@@ -137,7 +137,7 @@ You can also perform autoscale based on common web server metrics such as the HT
137
137
138
138
### Web Apps metrics
139
139
140
-
You can generate a list of the Web Apps metrics by using the following command in PowerShell.
140
+
You can generate a list of the Web Apps metrics by using the following command in PowerShell:
@@ -156,9 +156,9 @@ You can alert on or scale by these metrics.
156
156
157
157
## Commonly used Storage metrics
158
158
159
-
You can scale by Storage queue length, which is the number of messages in the Storage queue. Storage queue length is a special metric and the threshold is the number of messages per instance. For example, if there are two instances and if the threshold is set to 100, scaling occurs when the total number of messages in the queue is 200. That amount can be 100 messages per instance, 120 and 80, or any other combination that adds up to 200 or more.
159
+
You can scale by Azure Storage queue length, which is the number of messages in the Storage queue. Storage queue length is a special metric, and the threshold is the number of messages per instance. For example, if there are two instances and if the threshold is set to 100, scaling occurs when the total number of messages in the queue is 200. That amount can be 100 messages per instance, 120 plus 80, or any other combination that adds up to 200 or more.
160
160
161
-
Configure this setting in the Azure portal in the **Settings** pane. For virtual machine scale sets, you can update the Autoscale setting in the Resource Manager template to use *metricName* as *ApproximateMessageCount* and pass the ID of the storage queue as *metricResourceUri*.
161
+
Configure this setting in the Azure portal in the **Settings** pane. For virtual machine scale sets, you can update the autoscale setting in the Resource Manager template to use `metricName` as `ApproximateMessageCount` and pass the ID of the storage queue as `metricResourceUri`.
162
162
163
163
For example, with a Classic Storage account, the autoscale setting `metricTrigger` would include:
164
164
@@ -178,9 +178,9 @@ For a (non-classic) Storage account, the `metricTrigger` setting would include:
178
178
179
179
## Commonly used Service Bus metrics
180
180
181
-
You can scale by Service Bus queue length, which is the number of messages in the Service Bus queue. Service Bus queue length is a special metric, and the threshold is the number of messages per instance. For example, if there are two instances and if the threshold is set to 100, scaling occurs when the total number of messages in the queue is 200. That amount can be 100 messages per instance, 120 plus 80, or any other combination that adds up to 200 or more.
181
+
You can scale by Azure Service Bus queue length, which is the number of messages in the Service Bus queue. Service Bus queue length is a special metric, and the threshold is the number of messages per instance. For example, if there are two instances and if the threshold is set to 100, scaling occurs when the total number of messages in the queue is 200. That amount can be 100 messages per instance, 120 plus 80, or any other combination that adds up to 200 or more.
182
182
183
-
For Virtual Machine Scale Sets, you can update the Autoscale setting in the Resource Manager template to use *metricName* as *ApproximateMessageCount* and pass the ID of the storage queue as *metricResourceUri*.
183
+
For virtual machine scale sets, you can update the autoscale setting in the Resource Manager template to use `metricName` as `ApproximateMessageCount` and pass the ID of the storage queue as `metricResourceUri`.
184
184
185
185
```
186
186
"metricName": "ApproximateMessageCount",
@@ -189,4 +189,4 @@ For Virtual Machine Scale Sets, you can update the Autoscale setting in the Reso
189
189
```
190
190
191
191
> [!NOTE]
192
-
> For Service Bus, the resource group concept doesn't exist but Azure Resource Manager creates a default resource group per region. The resource group is usually in the 'Default-ServiceBus-[region]' format, for example, 'Default-ServiceBus-EastUS', 'Default-ServiceBus-WestUS', and 'Default-ServiceBus-AustraliaEast'.
192
+
> For Service Bus, the resource group concept doesn't exist, but Azure Resource Manager creates a default resource group per region. The resource group is usually in the Default-ServiceBus-[region] format. Examples are Default-ServiceBus-EastUS, Default-ServiceBus-WestUS, and Default-ServiceBus-AustraliaEast.
Copy file name to clipboardExpand all lines: articles/azure-monitor/autoscale/autoscale-get-started.md
+22-20Lines changed: 22 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,36 +6,36 @@ ms.date: 04/05/2022
6
6
ms.subservice: autoscale
7
7
ms.reviewer: riroloff
8
8
---
9
-
# Get started with Autoscale in Azure
9
+
# Get started with autoscale in Azure
10
10
11
-
This article describes how to set up your Autoscale settings for your resource in the Azure portal.
11
+
This article describes how to set up your autoscale settings for your resource in the Azure portal.
12
12
13
-
Azure Monitor autoscale applies only to [Azure Virtual Machine Scale Sets](https://azure.microsoft.com/services/virtual-machine-scale-sets/), [Cloud Services](https://azure.microsoft.com/services/cloud-services/), [Azure App Service - Web Apps](https://azure.microsoft.com/services/app-service/web/), and [API Management services](../../api-management/api-management-key-concepts.md).
13
+
Azure Monitor autoscale applies only to [Azure Virtual Machine Scale Sets](https://azure.microsoft.com/services/virtual-machine-scale-sets/), [Azure Cloud Services](https://azure.microsoft.com/services/cloud-services/), [Azure App Service - Web Apps](https://azure.microsoft.com/services/app-service/web/), and [Azure API Management](../../api-management/api-management-key-concepts.md).
14
14
15
-
## Discover the Autoscale settings in your subscription
15
+
## Discover the autoscale settings in your subscription
You can discover all the resources for which Autoscale is applicable in Azure Monitor. Use the following steps for a step-by-step walkthrough:
19
+
To discover all the resources for which autoscale is applicable in Azure Monitor, follow these steps.
20
20
21
21
1. Open the [Azure portal.][1]
22
22
1. Select the Azure Monitor icon at the top of the page.
23
23
24
24
[](./media/autoscale-get-started/click-on-monitor-1.png#lightbox)
25
25
26
-
1. Select **Autoscale** to view all the resources for which Autoscale is applicable, along with their current Autoscale status.
26
+
1. Select **Autoscale** to view all the resources for which autoscale is applicable, along with their current autoscale status.
27
27
28
28
[](./media/autoscale-get-started/click-on-autoscale-2.png#lightbox)
29
29
30
30
1. Use the filter pane at the top to scope down the list to select resources in a specific resource group, specific resource types, or a specific resource.
31
31
32
32
[](./media/autoscale-get-started/view-all-resources-3.png#lightbox)
33
33
34
-
For each resource, you'll find the current instance count and the Autoscale status. The Autoscale status can be:
34
+
For each resource, you'll find the current instance count and the autoscale status. The autoscale status can be:
35
35
36
-
-**Not configured**: You haven't enabled Autoscale yet for this resource.
37
-
-**Enabled**: You've enabled Autoscale for this resource.
38
-
-**Disabled**: You've disabled Autoscale for this resource.
36
+
-**Not configured**: You haven't enabled autoscale yet for this resource.
37
+
-**Enabled**: You've enabled autoscale for this resource.
38
+
-**Disabled**: You've disabled autoscale for this resource.
39
39
40
40
You can also reach the scaling page by selecting **All Resources** on the home page and filter to the resource you're interested in scaling.
41
41
@@ -45,11 +45,11 @@ You can discover all the resources for which Autoscale is applicable in Azure Mo
45
45
46
46
[](./media/autoscale-get-started/scaling-page.png#lightbox)
47
47
48
-
## Create your first Autoscale setting
48
+
## Create your first autoscale setting
49
49
50
-
Let's now go through a simple step-by-step walkthrough to create your first Autoscale setting.
50
+
Let's now go through a step-by-step walkthrough to create your first autoscale setting.
51
51
52
-
1. Open the **Autoscale** pane in Azure Monitor and select a resource that you want to scale. (The following steps use an App Service plan associated with a web app. You can [create your first ASP.NET web app in Azure in 5 minutes.][5])
52
+
1. Open the **Autoscale** pane in Azure Monitor and select a resource that you want to scale. The following steps use an App Service plan associated with a web app. You can [create your first ASP.NET web app in Azure in 5 minutes.][5]
53
53
1. The current instance count is 1. Select **Custom autoscale**.
54
54
55
55
[](./media/autoscale-get-started/manual-scale-04.png#lightbox)
@@ -78,6 +78,8 @@ Congratulations! You've now successfully created your first scale setting to aut
78
78
79
79
## Other considerations
80
80
81
+
The following sections introduce other considerations for autoscaling.
82
+
81
83
### Scale based on a schedule
82
84
83
85
You can set your scale differently for specific days of the week.
@@ -106,7 +108,7 @@ Whenever your resource is scaled up or down, an event is logged in the activity
106
108
107
109
![Screenshot that shows a Run history screen.][12]
108
110
109
-
To view the complete scale history for up to 90 days, select **Click here to see more details**. The activity log opens, with Autoscale preselected for your resource and category.
111
+
To view the complete scale history for up to 90 days, select **Click here to see more details**. The activity log opens, with autoscale preselected for your resource and category.
110
112
111
113
### View the scale definition of your resource
112
114
@@ -124,16 +126,16 @@ Autoscale uses a cool-down period to prevent "flapping," which is the rapid, rep
124
126
125
127
<aid="health-check-path"></a>
126
128
127
-
When your Azure web app is scaled out to multiple instances, App Service can perform health checks on your instances to route traffic to the healthy instances. To learn more, see [Monitor App Service instances using Health check.](../../app-service/monitor-instances-health-check.md).
129
+
When your Azure web app is scaled out to multiple instances, App Service can perform health checks on your instances to route traffic to the healthy instances. To learn more, see [Monitor App Service instances using Health check](../../app-service/monitor-instances-health-check.md).
128
130
129
-
## Move Autoscale to a different region
131
+
## Move autoscale to a different region
130
132
131
133
This section describes how to move Azure autoscale to another region under the same subscription and resource group. You can use REST API to move autoscale settings.
132
134
133
135
### Prerequisites
134
136
135
-
1. Ensure that the subscription and resource group are available and the details in both the source and destination regions are identical.
136
-
1. Ensure that Azure autoscale is available in the [Azure region you want to move to](https://azure.microsoft.com/global-infrastructure/services/?products=monitor®ions=all).
137
+
- Ensure that the subscription and resource group are available and the details in both the source and destination regions are identical.
138
+
- Ensure that Azure autoscale is available in the [Azure region you want to move to](https://azure.microsoft.com/global-infrastructure/services/?products=monitor®ions=all).
137
139
138
140
### Move
139
141
@@ -147,8 +149,8 @@ To learn more about moving resources between regions and disaster recovery in Az
147
149
148
150
## Next steps
149
151
150
-
-[Create an Activity Log Alert to monitor all Autoscale engine operations on your subscription](https://github.com/Azure/azure-quickstart-templates/tree/master/demos/monitor-autoscale-alert)
151
-
-[Create an Activity Log Alert to monitor all failed Autoscale scale-in/scale-out operations on your subscription](https://github.com/Azure/azure-quickstart-templates/tree/master/demos/monitor-autoscale-failed-alert)
152
+
-[Create an activity log alert to monitor all autoscale engine operations on your subscription](https://github.com/Azure/azure-quickstart-templates/tree/master/demos/monitor-autoscale-alert)
153
+
-[Create an activity log alert to monitor all failed autoscale scale-in/scale-out operations on your subscription](https://github.com/Azure/azure-quickstart-templates/tree/master/demos/monitor-autoscale-failed-alert)
0 commit comments