Skip to content

Commit c94a914

Browse files
Learn Build Service GitHub AppLearn Build Service GitHub App
authored andcommitted
Merging changes synced from https://github.com/MicrosoftDocs/azure-docs-pr (branch live)
2 parents 52a6263 + 03dec3c commit c94a914

File tree

9 files changed

+89
-76
lines changed

9 files changed

+89
-76
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 `

articles/azure-monitor/autoscale/autoscale-webhook-email.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Learn how to use autoscale actions to call web URLs or send email n
44
author: EdB-MSFT
55
ms.author: edbaynash
66
ms.topic: conceptual
7-
ms.date: 06/21/2023
7+
ms.date: 08/25/2024
88
ms.subservice: autoscale
99
ms.reviewer: akkumari
1010
---
@@ -15,7 +15,11 @@ This article shows you how to set up notifications so that you can call specific
1515
Webhooks allow you to send HTTP requests to a specific URL endpoint (callback URL) when a certain event or trigger occurs. Using webhooks, you can automate and streamline processes by enabling the automatic exchange of information between different systems or applications. Use webhooks to trigger custom code, notifications, or other actions to run when an autoscale event occurs.
1616

1717
## Email
18-
You can send email to any valid email address when an autoscale event occurs. Administrators and co-administrators of the subscription where the rule is running are also notified.
18+
You can send email to any valid email address when an autoscale event occurs.
19+
20+
> [!NOTE]
21+
> Starting April 3, 2024, you won't be able to add any new Co-Administrators for Azure Autoscale Notifications. Azure Classic administrators will be retired on August 31, 2024, and you would not be able to send Azure Autoscale Notifications using Administrators and Co-Administrators after August 31, 2024. For moe information, see [Prepare for Co-administrators retirement](/azure/role-based-access-control/classic-administrators?WT.mc_id=Portal-Microsoft_Azure_Monitoring&tabs=azure-portal#prepare-for-co-administrators-retirement)
22+
1923

2024
## Configure Notifications
2125

@@ -27,7 +31,7 @@ Use the Azure portal, CLI, PowerShell, or Resource Manager templates to configur
2731

2832
Select the **Notify** tab on the autoscale settings page to configure notifications.
2933

30-
Select the check boxes to send an email to the subscription administrator or co-administrators. You can also enter a list of email addresses to send notifications to.
34+
Enter a list of email addresses to send notifications to.
3135

3236
Enter a webhook URI to send a notification to a web service. You can also add custom headers to the webhook request. For example, you can add an authentication token in the header, query parameters, or add a custom header to identify the source of the request.
3337

@@ -42,19 +46,16 @@ Use the `az monitor autoscale update` or the `az monitor autoscale create` comma
4246

4347
The following parameters are used to configure notifications:
4448

45-
+ `--add-action` - The action to take when the autoscale rule is triggered. The value must be `email` or `webhook`.
46-
+ `--email-administrator {false, true}` - Send email to the subscription administrator.
47-
+ `--email-coadministrators {false, true}` - Send email to the subscription co-administrators.
49+
+ `--add-action` - The action to take when the autoscale rule is triggered. The value must be `email` or `webhook`, and followed by the email address or webhook URI.
4850
+ `--remove-action` - Remove an action previously added by `--add-action`. The value must be `email` or `webhook`. The parameter is only relevant for the `az monitor autoscale update` command.
4951

5052

51-
For example, the following command adds an email notification and a webhook notification to and existing autoscale setting. The command also sends email to the subscription administrator.
53+
For example, the following command adds an email notification and a webhook notification to and existing autoscale setting.
5254

5355
```azurecli
5456
az monitor autoscale update \
5557
--resource-group <resource group name> \
5658
--name <autoscale setting name> \
57-
--email-administrator true \
5859
--add-action email [email protected] \
5960
--add-action webhook http://myservice.com/webhook-listerner-123
6061
```
@@ -87,7 +88,6 @@ The following example shows how to configure a webhook and email notification.
8788
8889
$notification=New-AzAutoscaleNotificationObject `
8990
-EmailCustomEmail "[email protected]" `
90-
-EmailSendToSubscriptionAdministrator $true ` -EmailSendToSubscriptionCoAdministrator $true `
9191
-Webhook $webhook
9292
9393
@@ -134,13 +134,13 @@ When you use the Resource Manager templates or REST API, include the `notificati
134134

135135
| Field | Mandatory | Description |
136136
| --- | --- | --- |
137-
| operation |Yes |Value must be "Scale." |
138-
| sendToSubscriptionAdministrator |Yes |Value must be "true" or "false." |
139-
| sendToSubscriptionCoAdministrators |Yes |Value must be "true" or "false." |
140-
| customEmails |Yes |Value can be null [] or a string array of emails. |
141-
| webhooks |Yes |Value can be null or valid URI. |
142-
| serviceUri |Yes |Valid HTTPS URI. |
143-
| properties |Yes |Value must be empty {} or can contain key-value pairs. |
137+
| `operation` |Yes |Value must be `Scale`. |
138+
| `sendToSubscriptionAdministrator` |Yes |No longer supported. Value must be `false`. |
139+
| `sendToSubscriptionCoAdministrators` |Yes |No longer supported. Value must be `false`.|
140+
| `customEmails` |Yes |Value can be null [] or a string array of emails. |
141+
| `webhooks` |Yes |Value can be null or valid URI. |
142+
| `serviceUri` |Yes |Valid HTTPS URI. |
143+
| `properties` |Yes |Value must be empty {} or can contain key-value pairs. |
144144

145145
---
146146

@@ -157,15 +157,15 @@ When the autoscale notification is generated, the following metadata is included
157157
"operation": "Scale Out",
158158
"context": {
159159
"timestamp": "2023-06-22T07:01:47.8926726Z",
160-
"id": "/subscriptions/123456ab-9876-a1b2-a2b1-123a567b9f8767/resourceGroups/rg-001/providers/microsoft.insights/autoscalesettings/AutoscaleSettings-002",
160+
"id": "/subscriptions/0000aaaa-11BB-cccc-dd22-eeeeee333333/resourceGroups/rg-001/providers/microsoft.insights/autoscalesettings/AutoscaleSettings-002",
161161
"name": "AutoscaleSettings-002",
162162
"details": "Autoscale successfully started scale operation for resource 'ScaleableAppServicePlan' from capacity '1' to capacity '2'",
163-
"subscriptionId": "123456ab-9876-a1b2-a2b1-123a567b9f8767",
163+
"subscriptionId": "0000aaaa-11BB-cccc-dd22-eeeeee333333",
164164
"resourceGroupName": "rg-001",
165165
"resourceName": "ScaleableAppServicePlan",
166166
"resourceType": "microsoft.web/serverfarms",
167-
"resourceId": "/subscriptions/123456ab-9876-a1b2-a2b1-123a567b9f8767/resourceGroups/rg-001/providers/Microsoft.Web/serverfarms/ScaleableAppServicePlan",
168-
"portalLink": "https://portal.azure.com/#resource/subscriptions/123456ab-9876-a1b2-a2b1-123a567b9f8767/resourceGroups/rg-001/providers/Microsoft.Web/serverfarms/ScaleableAppServicePlan",
167+
"resourceId": "/subscriptions/0000aaaa-11BB-cccc-dd22-eeeeee333333/resourceGroups/rg-001/providers/Microsoft.Web/serverfarms/ScaleableAppServicePlan",
168+
"portalLink": "https://portal.azure.com/#resource/subscriptions/0000aaaa-11BB-cccc-dd22-eeeeee333333/resourceGroups/rg-001/providers/Microsoft.Web/serverfarms/ScaleableAppServicePlan",
169169
"resourceRegion": "West Central US",
170170
"oldCapacity": "1",
171171
"newCapacity": "2"
21.6 KB
Loading

0 commit comments

Comments
 (0)