Skip to content

Commit 4ce42e6

Browse files
Merge pull request #226341 from EdB-MSFT/fix-autoscale-profiles
Fix autoscale profiles
2 parents 18fbabe + 70bc842 commit 4ce42e6

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

articles/azure-monitor/autoscale/autoscale-common-scale-patterns.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,12 @@ For example, you have a Virtual Machine Scale Set and want to:
5252
In this example:
5353
+ The weekend profile starts at 00:01, Saturday morning and ends at 04:00 on Monday morning.
5454
+ The end times are left blank. The weekday profile will end when the weekend profile starts and vice-versa.
55-
+ There's no need for a default profile as there's no time that isn't covered by the other profiles.
55+
+ The default profile is irrelevant as there's no time that isn't covered by the other profiles.
5656

57+
>[!Note]
58+
> Creating a recurring profile with no end time is only supported via the portal.
59+
> If the end-time is not included in the CLI command, a default end-time of 23:59 will be implemented by creating a copy of the default profile with the naming convention `"name": {\"name\": \"Auto created default scale condition\", \"for\": \"<non-default profile name>\"}`
60+
5761
:::image type="content" source="./media/autoscale-common-scale-patterns/scale-differently-on-weekends.png" alt-text="A screenshot showing two autoscale profiles, one default and one for weekends." lightbox="./media/autoscale-common-scale-patterns/scale-differently-on-weekends.png":::
5862

5963
## Scale differently during specific events

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

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ In the portal, the end time field becomes the next start time for the default pr
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.
53+
> Creating a recurring profile with no end time is only supported via the portal.
5354
5455
## Multiple profiles using templates, CLI, and PowerShell
5556

@@ -205,18 +206,19 @@ The example below shows how to add a recurring autoscale profile, recurring on T
205206

206207
``` azurecli
207208
208-
az monitor autoscale profile create --autoscale-name VMSS1-Autoscale-607 --count 2 --max-count 10 --min-count 1 --name Thursdays --recurrence week thu --resource-group rg-vmss1 --start 06:00 --end 22:50 --timezone "Pacific Standard Time"
209+
az monitor autoscale profile create --autoscale-name VMSS1-Autoscale --count 2 --max-count 10 --min-count 1 --name Thursdays --recurrence week thu --resource-group rg-vmss1 --start 06:00 --end 22:50 --timezone "Pacific Standard Time"
209210
210-
az monitor autoscale rule create -g rg-vmss1 --autoscale-name VMSS1-Autoscale-607 --scale in 1 --condition "Percentage CPU < 25 avg 5m" --profile-name Thursdays
211+
az monitor autoscale rule create -g rg-vmss1 --autoscale-name VMSS1-Autoscale --scale in 1 --condition "Percentage CPU < 25 avg 5m" --profile-name Thursdays
211212
212-
az monitor autoscale rule create -g rg-vmss1 --autoscale-name VMSS1-Autoscale-607 --scale out 2 --condition "Percentage CPU > 50 avg 5m" --profile-name Thursdays
213+
az monitor autoscale rule create -g rg-vmss1 --autoscale-name VMSS1-Autoscale --scale out 2 --condition "Percentage CPU > 50 avg 5m" --profile-name Thursdays
213214
```
214215

215216
> [!NOTE]
216-
> The JSON for your autoscale default profile is modified by adding a recurring profile.
217-
> The `name` element of the default profile is changed to an object in the format: `"name": "{\"name\":\"Auto created default scale condition\",\"for\":\"recurring profile\"}"` where *recurring profile* is the profile name of your recurring profile.
217+
> * The JSON for your autoscale default profile is modified by adding a recurring profile.
218+
> The `name` element of the default profile is changed to an object in the format: `"name": "{\"name\":\"Auto created default scale condition\",\"for\":\"recurring profile name\"}"` where *recurring profile* is the profile name of your recurring profile.
218219
> The default profile also has a recurrence clause added to it that starts at the end time specified for the new recurring profile.
219-
> A new default profile is created for each recurring profile.
220+
> * A new default profile is created for each recurring profile.
221+
> * If the end time is not specified in the CLI command, the end time will be defaulted to 23:59.
220222
221223
## Updating the default profile when you have recurring profiles
222224

0 commit comments

Comments
 (0)