Skip to content

Commit 0c62414

Browse files
Merge pull request #285463 from EdB-MSFT/refresh-autoscale-multiple-profiles
fresheness updates
2 parents f0c9d0d + ffb6300 commit 0c62414

File tree

1 file changed

+18
-16
lines changed

1 file changed

+18
-16
lines changed

articles/azure-monitor/autoscale/autoscale-multiprofile.md

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ms.service: azure-monitor
77
ms.subservice: autoscale
88
ms.custom: devx-track-azurecli, devx-track-azurepowershell
99
ms.topic: conceptual
10-
ms.date: 06/20/2023
10+
ms.date: 08/25/2024
1111
ms.reviewer: akkumari
1212

1313
# Customer intent: As a user or dev ops administrator, I want to understand how set up autoscale with more than one profile so I can scale my resources with more flexibility.
@@ -35,18 +35,18 @@ Each time the autoscale service runs, the profiles are evaluated in the followin
3535
1. Recurring profiles
3636
1. Default profile
3737

38-
If a profile's date and time settings match the current time, autoscale will apply that profile's rules and capacity limits. Only the first applicable profile is used.
38+
If a profile's date and time settings match the current time, autoscale applies that profile's rules and capacity limits. Only the first applicable profile is used.
3939

40-
The example below shows an autoscale setting with a default profile and recurring profile.
40+
The following example shows an autoscale setting with a default profile and recurring profile.
4141

4242
:::image type="content" source="./media/autoscale-multiple-profiles/autoscale-default-recurring-profiles.png" lightbox="./media/autoscale-multiple-profiles/autoscale-default-recurring-profiles.png" alt-text="A screenshot showing an autoscale setting with default and recurring profile or scale condition.":::
4343

44-
In the above example, on Monday after 3 AM, the recurring profile will cease to be used. If the instance count is less than 3, autoscale scales to the new minimum of three. Autoscale continues to use this profile and scales based on CPU% until Monday at 8 PM. At all other times scaling will be done according to the default profile, based on the number of requests. After 8 PM on Monday, autoscale switches to the default profile. If for example, the number of instances at the time is 12, autoscale scales in to 10, which the maximum allowed for the default profile.
44+
In the example above, on Monday after 3 AM, the recurring profile will cease to be used. If the instance count is less than 3, autoscale scales to the new minimum of three. Autoscale continues to use this profile and scales based on CPU% until Monday at 8 PM. At all other times scaling is done according to the default profile, based on the number of requests. After 8 PM on Monday, autoscale switches to the default profile. If for example, the number of instances at the time is 12, autoscale scales in to 10, which the maximum allowed for the default profile.
4545

4646
## Multiple contiguous profiles
4747
Autoscale transitions between profiles based on their start times. The end time for a given profile is determined by the start time of the following profile.
4848

49-
In the portal, the end time field becomes the next start time for the default profile. You can't specify the same time for the end of one profile and the start of the next. The portal will force the end time to be one minute before the start time of the following profile. During this minute, the default profile will become active. If you don't want the default profile to become active between recurring profiles, leave the end time field empty.
49+
In the portal, the end time field becomes the next start time for the default profile. You can't specify the same time for the end of one profile and the start of the next. The portal forces the end time to be one minute before the start time of the following profile. During this minute, the default profile becomes active. If you don't want the default profile to become active between recurring profiles, leave the end time field empty.
5050

5151
> [!TIP]
5252
> To set up multiple contiguous profiles using the portal, leave the end time empty. The current profile will stop being used when the next profile becomes active. Only specify an end time when you want to revert to the default profile.
@@ -60,16 +60,16 @@ When creating multiple profiles using templates, the CLI, and PowerShell, follow
6060

6161
See the autoscale section of the [ARM template resource definition](/azure/templates/microsoft.insights/autoscalesettings) for a full template reference.
6262

63-
There is no specification in the template for end time. A profile will remain active until the next profile's start time.
63+
There's no specification in the template for end time. A profile will remain active until the next profile's start time.
6464

6565

6666
## Add a recurring profile using ARM templates
6767

68-
The example below shows how to create two recurring profiles. One profile for weekends from 00:01 on Saturday morning and a second Weekday profile starting on Mondays at 04:00. That means that the weekend profile will start on Saturday morning at one minute passed midnight and end on Monday morning at 04:00. The Weekday profile will start at 4am on Monday and end just after midnight on Saturday morning.
68+
The following example shows how to create two recurring profiles. One profile for weekends from 00:01 on Saturday morning and a second Weekday profile starting on Mondays at 04:00. That means that the weekend profile starts on Saturday morning at one minute passed midnight and end on Monday morning at 04:00. The Weekday profile will start at 4am on Monday and end just after midnight on Saturday morning.
6969

7070
Use the following command to deploy the template:
7171
`az deployment group create --name VMSS1-Autoscale-607 --resource-group rg-vmss1 --template-file VMSS1-autoscale.json`
72-
where *VMSS1-autoscale.json* is the file containing the JSON object below.
72+
where *VMSS1-autoscale.json* is the file containing the following JSON object.
7373

7474
``` JSON
7575
{
@@ -85,7 +85,7 @@ where *VMSS1-autoscale.json* is the file containing the JSON object below.
8585

8686
"name": "VMSS1-Autoscale-607",
8787
"enabled": true,
88-
"targetResourceUri": "/subscriptions/abc123456-987-f6e5-d43c-9a8d8e7f6541/resourceGroups/rg-vmss1/providers/Microsoft.Compute/virtualMachineScaleSets/VMSS1",
88+
"targetResourceUri": "/subscriptions/0000aaaa-11BB-cccc-dd22-eeeeee333333/resourceGroups/rg-vmss1/providers/Microsoft.Compute/virtualMachineScaleSets/VMSS1",
8989
"profiles": [
9090
{
9191
"name": "Weekday profile",
@@ -105,7 +105,7 @@ where *VMSS1-autoscale.json* is the file containing the JSON object below.
105105
"metricTrigger": {
106106
"metricName": "Inbound Flows",
107107
"metricNamespace": "microsoft.compute/virtualmachinescalesets",
108-
"metricResourceUri": "/subscriptions/abc123456-987-f6e5-d43c-9a8d8e7f6541/resourceGroups/rg-vmss1/providers/Microsoft.Compute/virtualMachineScaleSets/VMSS1",
108+
"metricResourceUri": "/subscriptions/0000aaaa-11BB-cccc-dd22-eeeeee333333/resourceGroups/rg-vmss1/providers/Microsoft.Compute/virtualMachineScaleSets/VMSS1",
109109
"operator": "GreaterThan",
110110
"statistic": "Average",
111111
"threshold": 100,
@@ -126,7 +126,7 @@ where *VMSS1-autoscale.json* is the file containing the JSON object below.
126126
"metricTrigger": {
127127
"metricName": "Inbound Flows",
128128
"metricNamespace": "microsoft.compute/virtualmachinescalesets",
129-
"metricResourceUri": "/subscriptions/abc123456-987-f6e5-d43c-9a8d8e7f6541/resourceGroups/rg-vmss1/providers/Microsoft.Compute/virtualMachineScaleSets/VMSS1",
129+
"metricResourceUri": "/subscriptions/0000aaaa-11BB-cccc-dd22-eeeeee333333/resourceGroups/rg-vmss1/providers/Microsoft.Compute/virtualMachineScaleSets/VMSS1",
130130
"operator": "LessThan",
131131
"statistic": "Average",
132132
"threshold": 60,
@@ -202,11 +202,12 @@ The following steps show how to create a recurring autoscale profile using the C
202202

203203
## Add a recurring profile using CLI
204204

205-
The example below shows how to add a recurring autoscale profile, recurring on Thursdays between 06:00 and 22:50.
205+
The following example shows how to add a recurring autoscale profile, recurring on Thursdays between 06:00 and 22:50.
206206

207207
``` azurecli
208208
209-
export autoscaleName=vmss-autoscalesetting=002
209+
az account set --subscription 0000aaaa-11bb-cccc-dd22-eeeeee333333
210+
export autoscaleName=vmss-autoscalesetting-002
210211
export resourceGroupName=rg-vmss-001
211212
212213
@@ -267,7 +268,7 @@ az monitor autoscale rule create -g rg-vmss1--autoscale-name VMSS1-Autoscale-607
267268

268269
PowerShell can be used to create multiple profiles in your autoscale settings.
269270

270-
See the [PowerShell Az.Monitor Reference](/powershell/module/az.monitor/#monitor) for the full set of autoscale PowerShell commands.
271+
See the [PowerShell Az PowerShell module.Monitor Reference](/powershell/module/az.monitor/#monitor) for the full set of autoscale PowerShell commands.
271272

272273
The following steps show how to create an autoscale profile using PowerShell.
273274

@@ -277,13 +278,14 @@ The following steps show how to create an autoscale profile using PowerShell.
277278

278279
## Add a recurring profile using PowerShell
279280

280-
The example below shows how to create default profile and a recurring autoscale profile, recurring on Wednesdays and Fridays between 09:00 and 23:00.
281+
The following example shows how to create default profile and a recurring autoscale profile, recurring on Wednesdays and Fridays between 09:00 and 23:00.
281282
The default profile uses the `CpuIn` and `CpuOut` Rules. The recurring profile uses the `BandwidthIn` and `BandwidthOut` rules.
282283

283284
```azurepowershell
284285
286+
Set-AzureSubscription -SubscriptionId "0000aaaa-11BB-cccc-dd22-eeeeee333333"
285287
$ResourceGroupName="rg-vmss-001"
286-
$TargetResourceId="/subscriptions/abc123456-987-f6e5-d43c-9a8d8e7f6541/resourceGroups/rg-vmss-001/providers/Microsoft.Compute/virtualMachineScaleSets/vmss-001"
288+
$TargetResourceId="/subscriptions/0000aaaa-11BB-cccc-dd22-eeeeee333333/resourceGroups/rg-vmss-001/providers/Microsoft.Compute/virtualMachineScaleSets/vmss-001"
287289
$ScaleSettingName="vmss-autoscalesetting=001"
288290
289291
$CpuOut=New-AzAutoscaleScaleRuleObject `

0 commit comments

Comments
 (0)