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
Copy file name to clipboardExpand all lines: articles/azure-monitor/autoscale/autoscale-diagnostics.md
+184-2Lines changed: 184 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,15 +9,18 @@ ms.topic: how-to
9
9
ms.date: 06/22/2022
10
10
ms.reviewer: akkumari
11
11
12
-
# Customer intent: As a dev opps admin I want to collect and analyze autoscale metrics and logs
12
+
# Customer intent: As a devops admin, I want to collect and analyze autoscale metrics and logs.
13
13
---
14
14
15
15
>>> Where is the flapping logs ?
16
16
17
17
18
18
# Diagnostic settings in Autoscale
19
19
20
-
Autoscale has two log categories and a set of metrics which can be enabled via the **Diagnostics settings** tab on the autoscale settings page.
20
+
Autoscale has two log categories and a set of metrics which can be enabled via the **Diagnostics settings** tab on the autoscale setting page.
21
+
22
+
:::image type="content" source="./media/autoscale-diagnostics/autoscale-diagnostics-menu.png" alt-text="A screenshot showing the menu in the autoscale setting page":::
23
+
21
24
22
25
The two categories are
23
26
*[Autoscale Evaluations](https://learn.microsoft.com/en-us/azure/azure-monitor/reference/tables/autoscaleevaluationslog) containing log data relating to rule evaluation.
@@ -246,4 +249,183 @@ Recorded at different intervals of an instance scale action.
246
249
}
247
250
```
248
251
252
+
## Activity Logs
253
+
The follwoing events are logged to the Activity log with CategoryValue =="Autoscale".
254
+
255
+
* Autoscale scale up initiated
256
+
* Autoscale scale up completed
257
+
* Autoscale scale down initiated
258
+
* Autoscale scale down completed
259
+
* Predictive Autoscale scale up initiated
260
+
* Predictive Autoscale scale up completed
261
+
* Metric Failure
262
+
* Metric Recovery
263
+
* Predictive Metric Failure
264
+
* Flapping
265
+
266
+
An extract of each log event name, showing the relevant parts of the `Propertes` element are shown below:
267
+
268
+
### Autoscale action
269
+
270
+
Logged when autoscale attempts to scale in or out.
271
+
272
+
```json
273
+
{
274
+
"eventCategory": "Autoscale",
275
+
"eventName": "AutoscaleAction",
276
+
...
277
+
"eventProperties": "{
278
+
"Description": "The autoscale engine attempting to scale resource '/subscriptions/d1234567-9876-a1b2-a2b1-123a567b9f8767/ resourcegroups/ed-rg-001/providers/Microsoft.Web/serverFarms/ScaleableAppServicePlan' from 2 instances count to 1 instances count.",
Logged when autoscale cannot determine the value of the metric used in the scale rule.
368
+
369
+
```JSON
370
+
"Properties":{
371
+
"eventCategory": "Autoscale",
372
+
"eventName": "MetricFailure",
373
+
...
374
+
"eventProperties": "{\"Notes\":\"To ensure service availability, Autoscale will scale out the resource to the default capacity if it is greater than the current capacity\"}",
375
+
...
376
+
"activityStatusValue": "Failed"
377
+
}
378
+
```
379
+
### Metric recovery
380
+
381
+
Logged when autoscale can once again determine the value of the metric used in the scale rule after a `MetricFailure` event
382
+
383
+
```json
384
+
"Properties":{
385
+
"eventCategory": "Autoscale",
386
+
"eventName": "MetricRecovery",
387
+
...
388
+
"eventProperties": "{}",
389
+
...
390
+
"activityStatusValue": "Succeeded"
391
+
}
392
+
```
393
+
### Predictive Metric Failure
394
+
395
+
Logged when autoscale can not calculate a predicted scale events due to the metric being unavailable.
396
+
397
+
```json
398
+
"Properties":{
399
+
"eventCategory": "Autoscale",
400
+
"eventName": "PredictiveMetricFailure",
401
+
...
402
+
"eventProperties": "{\"Notes\":\"To ensure service availability, Autoscale will scale out the resource to the default capacity if it is greater than the current capacity\"}",
403
+
...
404
+
"activityStatusValue": "Failed"
405
+
}
406
+
```
407
+
### Flapping Occurred
408
+
409
+
Logged when autoscale detects a flapping and scales differently to avoid it.
410
+
411
+
```JSON
412
+
"Properties":{
413
+
"eventCategory": "Autoscale",
414
+
"eventName": "FlappingOccurred",
415
+
...
416
+
"eventProperties":
417
+
"{"Description":"Scale down will occur with updated instance count to avoid flapping.
0 commit comments