Skip to content

Commit ce26b35

Browse files
committed
clarify end times
1 parent cb94aec commit ce26b35

File tree

1 file changed

+9
-151
lines changed

1 file changed

+9
-151
lines changed

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

Lines changed: 9 additions & 151 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ In the above example, on Monday after 6 AM, the recurring profile will be used.
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 cannot 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 cannot 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.
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.
@@ -57,19 +57,14 @@ When creating multiple profiles using templates, the CLI, and PowerShell, follow
5757

5858
## [ARM templates](#tab/templates)
5959

60-
Follow the rules below when using ARM templates to create autoscale settings with multiple profiles:
61-
6260
See the autoscale section of the [ARM template resource definition](https://learn.microsoft.com/azure/templates/microsoft.insights/autoscalesettings) for a full template reference.
6361

64-
* There is no specification for end time. A profile will remain active until the next profile's start time.
65-
Create a default profile for each recurring profile. If you have two recurring profiles, create two matching default profiles.
66-
* The default profile must contain a `recurrence` section that is the same as the recurring profile, with the `hours` and `minutes` elements set for the end time of the recurring profile. If you don't specify a recurrence with a start time for the default profile, the last recurrence rule will remain in effect.
67-
* The `name` element for the default profile is an object with the following format: `"name": "{\"name\":\"Auto created default scale condition\",\"for\":\"Recurring profile name\"}"` where the recurring profile name is the value of the `name` element for the recurring profile. If the name isn't specified correctly, the default profile will appear as another recurring profile.
68-
*The rules above don't apply for non-recurring scheduled profiles.
62+
Note that there is no specification in the template for end time. A profile will remain active until the next profile's start time.
63+
6964

7065
## Add a recurring profile using AIM templates
7166

72-
The example below shows how to create two recurring profiles. One profile for weekends between 06:00 and 19:00, Saturday and Sunday, and a second for Mondays between 04:00 and 15:00. Note the two default profiles, one for each recurring profile.
67+
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 end just after midnight on Saturday morning.
7368

7469
Use the following command to deploy the template:
7570
` az deployment group create --name VMSS1-Autoscale-607 --resource-group rg-vmss1 --template-file VMSS1-autoscale.json`
@@ -92,7 +87,7 @@ where *VMSS1-autoscale.json* is the the file containing the JSON object below.
9287
"targetResourceUri": "/subscriptions/abc123456-987-f6e5-d43c-9a8d8e7f6541/resourceGroups/rg-vmss1/providers/Microsoft.Compute/virtualMachineScaleSets/VMSS1",
9388
"profiles": [
9489
{
95-
"name": "Monday profile",
90+
"name": "Weekday profile",
9691
"capacity": {
9792
"minimum": "3",
9893
"maximum": "20",
@@ -171,152 +166,16 @@ where *VMSS1-autoscale.json* is the the file containing the JSON object below.
171166
"schedule": {
172167
"timeZone": "E. Europe Standard Time",
173168
"days": [
174-
"Saturday",
175-
"Sunday"
169+
"Saturday"
176170
],
177171
"hours": [
178-
6
179-
],
180-
"minutes": [
181172
0
182-
]
183-
}
184-
}
185-
},
186-
{
187-
"name": "{\"name\":\"Auto created default scale condition\",\"for\":\"Weekend profile\"}",
188-
"capacity": {
189-
"minimum": "2",
190-
"maximum": "10",
191-
"default": "2"
192-
},
193-
"recurrence": {
194-
"frequency": "Week",
195-
"schedule": {
196-
"timeZone": "E. Europe Standard Time",
197-
"days": [
198-
"Saturday",
199-
"Sunday"
200-
],
201-
"hours": [
202-
19
203173
],
204174
"minutes": [
205-
0
175+
1
206176
]
207177
}
208-
},
209-
"rules": [
210-
{
211-
"scaleAction": {
212-
"direction": "Increase",
213-
"type": "ChangeCount",
214-
"value": "1",
215-
"cooldown": "PT3M"
216-
},
217-
"metricTrigger": {
218-
"metricName": "Percentage CPU",
219-
"metricNamespace": "microsoft.compute/virtualmachinescalesets",
220-
"metricResourceUri": "/subscriptions/abc123456-987-f6e5-d43c-9a8d8e7f6541/resourceGroups/rg-vmss1/providers/Microsoft.Compute/virtualMachineScaleSets/VMSS1",
221-
"operator": "GreaterThan",
222-
"statistic": "Average",
223-
"threshold": 50,
224-
"timeAggregation": "Average",
225-
"timeGrain": "PT1M",
226-
"timeWindow": "PT1M",
227-
"Dimensions": [],
228-
"dividePerInstance": false
229-
}
230-
},
231-
{
232-
"scaleAction": {
233-
"direction": "Decrease",
234-
"type": "ChangeCount",
235-
"value": "1",
236-
"cooldown": "PT3M"
237-
},
238-
"metricTrigger": {
239-
"metricName": "Percentage CPU",
240-
"metricNamespace": "microsoft.compute/virtualmachinescalesets",
241-
"metricResourceUri": "/subscriptions/abc123456-987-f6e5-d43c-9a8d8e7f6541/resourceGroups/rg-vmss1/providers/Microsoft.Compute/virtualMachineScaleSets/VMSS1",
242-
"operator": "LessThan",
243-
"statistic": "Average",
244-
"threshold": 39,
245-
"timeAggregation": "Average",
246-
"timeGrain": "PT1M",
247-
"timeWindow": "PT3M",
248-
"Dimensions": [],
249-
"dividePerInstance": false
250-
}
251-
}
252-
]
253-
},
254-
{
255-
"name": "{\"name\":\"Auto created default scale condition\",\"for\":\"Monday profile\"}",
256-
"capacity": {
257-
"minimum": "2",
258-
"maximum": "10",
259-
"default": "2"
260-
},
261-
"recurrence": {
262-
"frequency": "Week",
263-
"schedule": {
264-
"timeZone": "E. Europe Standard Time",
265-
"days": [
266-
"Monday"
267-
],
268-
"hours": [
269-
15
270-
],
271-
"minutes": [
272-
0
273-
]
274-
}
275-
},
276-
"rules": [
277-
{
278-
"scaleAction": {
279-
"direction": "Increase",
280-
"type": "ChangeCount",
281-
"value": "1",
282-
"cooldown": "PT3M"
283-
},
284-
"metricTrigger": {
285-
"metricName": "Percentage CPU",
286-
"metricNamespace": "microsoft.compute/virtualmachinescalesets",
287-
"metricResourceUri": "/subscriptions/abc123456-987-f6e5-d43c-9a8d8e7f6541/resourceGroups/rg-vmss1/providers/Microsoft.Compute/virtualMachineScaleSets/VMSS1",
288-
"operator": "GreaterThan",
289-
"statistic": "Average",
290-
"threshold": 50,
291-
"timeAggregation": "Average",
292-
"timeGrain": "PT1M",
293-
"timeWindow": "PT1M",
294-
"Dimensions": [],
295-
"dividePerInstance": false
296-
}
297-
},
298-
{
299-
"scaleAction": {
300-
"direction": "Decrease",
301-
"type": "ChangeCount",
302-
"value": "1",
303-
"cooldown": "PT3M"
304-
},
305-
"metricTrigger": {
306-
"metricName": "Percentage CPU",
307-
"metricNamespace": "microsoft.compute/virtualmachinescalesets",
308-
"metricResourceUri": "/subscriptions/abc123456-987-f6e5-d43c-9a8d8e7f6541/resourceGroups/rg-vmss1/providers/Microsoft.Compute/virtualMachineScaleSets/VMSS1",
309-
"operator": "LessThan",
310-
"statistic": "Average",
311-
"threshold": 39,
312-
"timeAggregation": "Average",
313-
"timeGrain": "PT1M",
314-
"timeWindow": "PT3M",
315-
"Dimensions": [],
316-
"dividePerInstance": false
317-
}
318-
}
319-
]
178+
}
320179
}
321180
],
322181
"notifications": [],
@@ -325,8 +184,7 @@ where *VMSS1-autoscale.json* is the the file containing the JSON object below.
325184

326185
}
327186
]
328-
}
329-
187+
}
330188
```
331189

332190
## [CLI](#tab/cli)

0 commit comments

Comments
 (0)