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/alerts/alerts-troubleshoot-metric.md
+21-26Lines changed: 21 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,12 +18,12 @@ Azure Monitor alerts proactively notify you when important conditions are found
18
18
If you believe a metric alert should have fired but it didn't fire and it isn't found in the Azure portal, try the following steps:
19
19
20
20
1.**Configuration:** Review the metric alert rule configuration to make sure it's properly configured:
21
-
- Check that **Aggregation type** and **Aggregation granularity (period)** are configured as expected. **Aggregation type** determines how metric values are aggregated. To learn more, see [Azure Monitor Metrics aggregation and display explained](../essentials/metrics-aggregation-explained.md#aggregation-types). **Aggregation granularity (period)** controls how far back the evaluation aggregates the metric values each time the alert rule runs.
21
+
- Check that **Aggregation type** and **Aggregation granularity (Period)** are configured as expected. **Aggregation type** determines how metric values are aggregated. To learn more, see [Azure Monitor Metrics aggregation and display explained](../essentials/metrics-aggregation-explained.md#aggregation-types). **Aggregation granularity (Period)** controls how far back the evaluation aggregates the metric values each time the alert rule runs.
22
22
- Check that **Threshold value** or **Sensitivity** are configured as expected.
23
23
- For an alert rule that uses Dynamic Thresholds, check if advanced settings are configured. **Number of violations** might filter alerts, and **Ignore data before** can affect how the thresholds are calculated.
24
24
25
25
> [!NOTE]
26
-
> Dynamic Thresholds require at least 3 days and 30 metric samples before they become active.
26
+
> Dynamic thresholds require at least 3 days and 30 metric samples before they become active.
27
27
28
28
1.**Fired but no notification:** Review the [fired alerts list](https://portal.azure.com/#blade/Microsoft_Azure_Monitoring/AzureMonitoringBrowseBlade/alertsV2) to see if you can locate the fired alert. If you can see the alert in the list but have an issue with some of its actions or notifications, see [Troubleshooting problems in Azure Monitor alerts](./alerts-troubleshoot.md#action-or-notification-on-my-alert-did-not-work-as-expected).
29
29
@@ -34,36 +34,36 @@ If you believe a metric alert should have fired but it didn't fire and it isn't
34
34
1.**Aggregation and time granularity:** If you're visualizing the metric by using [metrics charts](https://portal.azure.com/#blade/Microsoft_Azure_Monitoring/AzureMonitoringBrowseBlade/metrics), ensure that:
35
35
36
36
* The selected **Aggregation** in the metric chart is the same as **Aggregation type** in your alert rule.
37
-
* The selected **Time granularity** is the same as **Aggregation granularity (period)** in your alert rule, and isn't set to **Automatic**.
37
+
* The selected **Time granularity** is the same as **Aggregation granularity (Period)** in your alert rule, and isn't set to **Automatic**.
38
38
39
39
## Metric alert fired when it shouldn't have
40
40
41
41
If you believe your metric alert shouldn't have fired but it did, the following steps might help resolve the issue.
42
42
43
-
1. Review the [fired alerts list](https://portal.azure.com/#blade/Microsoft_Azure_Monitoring/AzureMonitoringBrowseBlade/alertsV2) to locate the fired alert. Select the alert to view its details. Review the information provided under **Why did this alert fire?** to see the metric chart, **Metric Value**, and **Threshold value**, at the time when the alert was triggered.
43
+
1. Review the [fired alerts list](https://portal.azure.com/#blade/Microsoft_Azure_Monitoring/AzureMonitoringBrowseBlade/alertsV2) to locate the fired alert. Select the alert to view its details. Review the information provided under **Why did this alert fire?** to see the metric chart, **Metric value**, and **Threshold value** at the time when the alert was triggered.
44
44
45
45
> [!NOTE]
46
46
> If you're using a Dynamic Thresholds condition type and think that the thresholds used weren't correct, provide feedback by using the frown icon. This feedback affects the machine learning algorithmic research and will help improve future detections.
47
47
48
48
1. If you've selected multiple dimension values for a metric, the alert is triggered when *any* of the metric time series (as defined by the combination of dimension values) breaches the threshold. For more information about using dimensions in metric alerts, see [this website](./alerts-metric-overview.md#using-dimensions).
49
49
50
50
1. Review the alert rule configuration to make sure it's properly configured:
51
-
- Check that **Aggregation type**, **Aggregation granularity (period)**, and **Threshold value** or **Sensitivity** are configured as expected.
52
-
- For an alert rule that uses Dynamic Thresholds, check if advanced settings are configured, as **Number of violations** might filter alerts and **Ignore data before** can affect how the thresholds are calculated.
51
+
- Check that **Aggregation type**, **Aggregation granularity (Period)**, and **Threshold value** or **Sensitivity** are configured as expected.
52
+
- For an alert rule that uses dynamic thresholds, check if advanced settings are configured, as **Number of violations** might filter alerts and **Ignore data before** can affect how the thresholds are calculated.
53
53
54
54
> [!NOTE]
55
-
> Dynamic Thresholds require at least 3 days and 30 metric samples before becoming active.
55
+
> Dynamic thresholds require at least 3 days and 30 metric samples before becoming active.
56
56
57
57
1. If you're visualizing the metric by using [Metrics chart](https://portal.azure.com/#blade/Microsoft_Azure_Monitoring/AzureMonitoringBrowseBlade/metrics), ensure that:
58
58
59
59
- The selected **Aggregation** in the metric chart is the same as the **Aggregation type** in your alert rule.
60
-
- The selected **Time granularity** is the same as the **Aggregation granularity (period)** in your alert rule, and that it isn't set to **Automatic**.
60
+
- The selected **Time granularity** is the same as the **Aggregation granularity (Period)** in your alert rule, and that it isn't set to **Automatic**.
61
61
62
62
1. If the alert fired while there are already fired alerts that monitor the same criteria that aren't resolved, check if the alert rule has been configured not to automatically resolve alerts. Such configuration causes the alert rule to become stateless, which means the alert rule doesn't auto-resolve fired alerts and doesn't require a fired alert to be resolved before firing again on the same time series.
63
63
To check if the alert rule is configured not to auto-resolve:
64
64
65
65
- Edit the alert rule in the Azure portal. See if the **Automatically resolve alerts** checkbox under the **Alert rule details** section is cleared.
66
-
- Review the script used to deploy the alert rule or retrieve the alert rule definition. Check if the *autoMitigate* property is set to **false**.
66
+
- Review the script used to deploy the alert rule or retrieve the alert rule definition. Check if the `autoMitigate` property is set to `false`.
67
67
68
68
## Can't find the metric to alert on: Virtual machines guest metrics
69
69
@@ -110,7 +110,7 @@ When you delete an Azure resource, associated metric alert rules aren't deleted
110
110
111
111
Metric alerts are stateful by default, so other alerts aren't fired if there's already a fired alert on a specific time series. To make a specific metric alert rule stateless and get alerted on every evaluation<sup>1</sup> in which the alert condition is met, use one of these options:
112
112
113
-
- If you create the alert rule programmatically, for example, via [Azure Resource Manager](./alerts-metric-create-templates.md), [PowerShell](/powershell/module/az.monitor/), [REST](/rest/api/monitor/metricalerts/createorupdate), or the [Azure CLI](/cli/azure/monitor/metrics/alert), set the *autoMitigate* property to **False**.
113
+
- If you create the alert rule programmatically, for example, via [Azure Resource Manager](./alerts-metric-create-templates.md), [PowerShell](/powershell/module/az.monitor/), [REST](/rest/api/monitor/metricalerts/createorupdate), or the [Azure CLI](/cli/azure/monitor/metrics/alert), set the `autoMitigate` property to `False`.
114
114
- If you create the alert rule via the Azure portal, clear the **Automatically resolve alerts** option under the **Alert rule details** section.
115
115
116
116
<sup>1</sup> For stateless metric alert rules, an alert triggers once every 10 minutes at a minimum, even if the frequency of evaluation is equal or less than 5 minutes and the condition is still being met.
@@ -122,7 +122,7 @@ Metric alerts are stateful by default, so other alerts aren't fired if there's a
122
122
123
123
When you create a metric alert rule, the metric name is validated against the [Metric Definitions API](/rest/api/monitor/metricdefinitions/list) to make sure it exists. In some cases, you want to create an alert rule on a custom metric even before it's emitted. An example is when you use a Resource Manager template to create an Application Insights resource that will emit a custom metric, along with an alert rule that monitors that metric.
124
124
125
-
To avoid a deployment failure when you try to validate the custom metric's definitions, use the *skipMetricValidation* parameter in the `criteria` section of the alert rule. This parameter will cause the metric validation to be skipped. See the following example for how to use this parameter in a Resource Manager template. For more information, see the [complete Resource Manager template samples for creating metric alert rules](./alerts-metric-create-templates.md).
125
+
To avoid a deployment failure when you try to validate the custom metric's definitions, use the `skipMetricValidation` parameter in the `criteria` section of the alert rule. This parameter will cause the metric validation to be skipped. See the following example for how to use this parameter in a Resource Manager template. For more information, see the [complete Resource Manager template samples for creating metric alert rules](./alerts-metric-create-templates.md).
126
126
127
127
```json
128
128
"criteria": {
@@ -143,7 +143,7 @@ To avoid a deployment failure when you try to validate the custom metric's defin
143
143
```
144
144
145
145
> [!NOTE]
146
-
> Using the *skipMetricValidation* parameter might also be required when you define an alert rule on an existing custom metric that hasn't been emitted in several days.
146
+
> Using the `skipMetricValidation` parameter might also be required when you define an alert rule on an existing custom metric that hasn't been emitted in several days.
147
147
148
148
## Process data for a metric alert rule in a specific region
149
149
@@ -200,9 +200,9 @@ To check the current usage of metric alert rules, follow the next steps.
## Manage alert rules by using Resource Manager templates, REST API, PowerShell, or the Azure CLI
208
208
@@ -222,28 +222,23 @@ Review the [REST API guide](/rest/api/monitor/metricalerts/) to verify you're pa
222
222
Make sure that you're using the right PowerShell cmdlets for metric alerts:
223
223
224
224
- PowerShell cmdlets for metric alerts are available in the [Az.Monitor module](/powershell/module/az.monitor/).
225
-
- Make sure to use the cmdlets that end with "V2" for new (non-classic) metric alerts, for example, [Add-AzMetricAlertRuleV2](/powershell/module/az.monitor/add-azmetricalertrulev2).
225
+
- Make sure to use the cmdlets that end with `V2` for new (non-classic) metric alerts, for example, [Add-AzMetricAlertRuleV2](/powershell/module/az.monitor/add-azmetricalertrulev2).
226
226
227
227
### Azure CLI
228
228
229
229
Make sure you're using the right CLI commands for metric alerts:
230
230
231
231
- CLI commands for metric alerts start with `az monitor metrics alert`. Review the [Azure CLI reference](/cli/azure/monitor/metrics/alert) to learn about the syntax.
232
232
- You can see a [sample that shows how to use the metric alert CLI](./alerts-metric.md#with-azure-cli).
233
-
- To alert on a custom metric, make sure to prefix the metric name with the relevant metric namespace: NAMESPACE.METRIC.
233
+
- To alert on a custom metric, make sure to prefix the metric name with the relevant metric namespace: `NAMESPACE.METRIC`.
234
234
235
235
### General
236
236
237
237
- If you receive a `Metric not found` error:
238
-
239
238
-**For a platform metric:** Make sure you're using the **Metric** name from [the Azure Monitor supported metrics page](../essentials/metrics-supported.md) and not the **Metric Display Name**.
240
-
241
239
-**For a custom metric:** Make sure that the metric is already being emitted because you can't create an alert rule on a custom metric that doesn't yet exist. Also ensure that you're providing the custom metric's namespace. For a Resource Manager template example, see [Create a metric alert with a Resource Manager template](./alerts-metric-create-templates.md#template-for-a-static-threshold-metric-alert-that-monitors-a-custom-metric).
242
-
243
240
- If you're creating [metric alerts on logs](./alerts-metric-logs.md), ensure appropriate dependencies are included. For a sample template, see [Create Metric Alerts for Logs in Azure Monitor](./alerts-metric-logs.md#resource-template-for-metric-alerts-for-logs).
244
-
245
241
- If you're creating an alert rule that contains multiple criteria, note the following constraints:
246
-
247
242
- You can only select one value per dimension within each criterion.
248
243
- You can't use an asterisk (\*) as a dimension value.
249
244
- When metrics that are configured in different criterions support the same dimension, a configured dimension value must be explicitly set in the same way for all those metrics. For a Resource Manager template example, see [Create a metric alert with a Resource Manager template](./alerts-metric-create-templates.md#template-for-a-static-threshold-metric-alert-that-monitors-multiple-criteria).
@@ -293,12 +288,12 @@ For example:
293
288
- Consider a metric alert rule that's defined on a storage account and monitors two conditions:
294
289
* Total **Transactions** > 5
295
290
* Average **SuccessE2ELatency** > 250 ms
296
-
- You want to update the first condition and only monitor transactions where the **ApiName** dimension equals *"GetBlob"*.
297
-
- Because both the **Transactions** and **SuccessE2ELatency** metrics support an **ApiName** dimension, you'll need to update both conditions and have them specify the **ApiName** dimension with a *"GetBlob"* value.
291
+
- You want to update the first condition and only monitor transactions where the **ApiName** dimension equals `"GetBlob"`.
292
+
- Because both the **Transactions** and **SuccessE2ELatency** metrics support an **ApiName** dimension, you'll need to update both conditions and have them specify the **ApiName** dimension with a `"GetBlob"` value.
298
293
299
294
## Set the alert rule's period and frequency
300
295
301
-
Choose an **Aggregation granularity (period)** that's larger than the **Frequency of evaluation** to reduce the likelihood of missing the first evaluation of added time series in the following cases:
296
+
Choose an **Aggregation granularity (Period)** that's larger than the **Frequency of evaluation** to reduce the likelihood of missing the first evaluation of added time series in the following cases:
302
297
303
298
-**Metric alert rule that monitors multiple dimensions:** When a new dimension value combination is added.
304
299
-**Metric alert rule that monitors multiple resources:** When a new resource is added to the scope.
@@ -335,7 +330,7 @@ Sometimes an alert rule won't trigger, even when a high sensitivity is configure
335
330
Consider one of the following options:
336
331
337
332
* Move to monitoring a complementary metric that's suitable for your scenario, if applicable. For example, check for changes in success rate rather than failure rate.
338
-
* Try selecting a different aggregation granularity (period).
333
+
* Try selecting a different value for **Aggregation granularity (Period)**.
339
334
* Check if there was a drastic change in the metric behavior in the last 10 days, for example, an outage. An abrupt change can affect the upper and lower thresholds calculated for the metric and make them broader. Wait for a few days until the outage is no longer taken into the thresholds calculation. Or use the **Ignore data before** option under **Advanced settings**.
340
335
* If your data has weekly seasonality, but not enough history is available for the metric, the calculated thresholds can result in having broad upper and lower bounds. For example, the calculation can treat weekdays and weekends in the same way and build wide borders that don't always fit the data. This issue should resolve itself after enough metric history is available. Then, the correct seasonality will be detected and the calculated thresholds will update accordingly.
0 commit comments