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/platform/alerts-metric-create-templates.md
+231-9Lines changed: 231 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -545,9 +545,11 @@ az group deployment create \
545
545
>
546
546
> While the metric alert could be created in a different resource group to the target resource, we recommend using the same resource group as your target resource.
547
547
548
-
## Template for a more advanced static threshold metric alert
548
+
## Template for a static threshold metric alert that monitors multiple criteria
549
549
550
-
Newer metric alerts support alerting on multi-dimensional metrics as well as supporting multiple criteria. You can use the following template to create a more advanced metric alert on dimensional metrics and specify multiple criteria.
550
+
Newer metric alerts support alerting on multi-dimensional metrics as well as supporting multiple criteria. You can use the following template to create a more advanced metric alert rule on dimensional metrics and specify multiple criteria.
551
+
552
+
Please note that when the alert rule contains multiple criteria, the use of dimensions is limited to one value per dimension within each criterion.
551
553
552
554
Save the json below as advancedstaticmetricalert.json for the purpose of this walkthrough.
553
555
@@ -751,7 +753,7 @@ Save and modify the json below as advancedstaticmetricalert.parameters.json for
751
753
```
752
754
753
755
754
-
You can create the metric alert using the template and parameters file using PowerShell or Azure CLI from your current working directory
756
+
You can create the metric alert using the template and parameters file using PowerShell or Azure CLI from your current working directory.
755
757
756
758
Using Azure PowerShell
757
759
```powershell
@@ -778,17 +780,237 @@ az group deployment create \
778
780
779
781
>[!NOTE]
780
782
>
781
-
> While the metric alert could be created in a different resource group to the target resource, we recommend using the same resource group as your target resource.
783
+
> When an alert rule contains multiple criteria, the use of dimensions is limited to one value per dimension within each criterion.
784
+
785
+
## Template for a static metric alert that monitors multiple dimensions
786
+
787
+
You can use the following template to create a static metric alert rule on dimensional metrics.
788
+
789
+
A single alert rule can monitor multiple metric time series at a time, which results in fewer alert rules to manage.
790
+
791
+
In the example below, the alert rule will monitor the dimensions value combinations of the **ResponseType** and **ApiName** dimensions for the **Transactions** metric:
792
+
1.**ResponsType** - The use of the "\*" wildcard means that for each value of the **ResponseType** dimension, including future values, a different time series will be monitored individually.
793
+
2.**ApiName** - A different time series will be monitored only for the **GetBlob** and **PutBlob** dimension values.
794
+
795
+
For example, a few of the potential time series that will be monitored by this alert rule are:
"description": "Specifies whether the alert is enabled"
840
+
}
841
+
},
842
+
"resourceId": {
843
+
"type": "string",
844
+
"defaultValue": "",
845
+
"metadata": {
846
+
"description": "Resource ID of the resource emitting the metric that will be used for the comparison."
847
+
}
848
+
},
849
+
"criterion":{
850
+
"type": "object",
851
+
"metadata": {
852
+
"description": "Criterion includes metric name, dimension values, threshold and an operator. The alert rule fires when ALL criteria are met"
853
+
}
854
+
},
855
+
"windowSize": {
856
+
"type": "string",
857
+
"defaultValue": "PT5M",
858
+
"allowedValues": [
859
+
"PT1M",
860
+
"PT5M",
861
+
"PT15M",
862
+
"PT30M",
863
+
"PT1H",
864
+
"PT6H",
865
+
"PT12H",
866
+
"PT24H"
867
+
],
868
+
"metadata": {
869
+
"description": "Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format."
870
+
}
871
+
},
872
+
"evaluationFrequency": {
873
+
"type": "string",
874
+
"defaultValue": "PT1M",
875
+
"allowedValues": [
876
+
"PT1M",
877
+
"PT5M",
878
+
"PT15M",
879
+
"PT30M",
880
+
"PT1H"
881
+
],
882
+
"metadata": {
883
+
"description": "how often the metric alert is evaluated represented in ISO 8601 duration format"
884
+
}
885
+
},
886
+
"actionGroupId": {
887
+
"type": "string",
888
+
"defaultValue": "",
889
+
"metadata": {
890
+
"description": "The ID of the action group that is triggered when the alert is activated or deactivated"
## Template for a Dynamic Thresholds metric alert that monitors multiple dimensions
784
1006
785
1007
You can use the following template to create a more advanced Dynamic Thresholds metric alert rule on dimensional metrics.
786
1008
787
1009
A single Dynamic Thresholds alert rule can create tailored thresholds for hundreds of metric time series (even different types) at a time, which results in fewer alert rules to manage.
788
1010
789
1011
In the example below, the alert rule will monitor the dimensions value combinations of the **ResponseType** and **ApiName** dimensions for the **Transactions** metric:
790
-
1. ResponsType - For each value of the **ResponseType** dimension, including future values, a different time series will be monitored individually.
791
-
2. ApiName - A different time series will be monitored only for the **GetBlob** and **PutBlob** dimension values.
1012
+
1.**ResponsType** - For each value of the **ResponseType** dimension, including future values, a different time series will be monitored individually.
1013
+
2.**ApiName** - A different time series will be monitored only for the **GetBlob** and **PutBlob** dimension values.
792
1014
793
1015
For example, a few of the potential time series that will be monitored by this alert rule are:
@@ -974,7 +1196,7 @@ Save and modify the json below as advanceddynamicmetricalert.parameters.json for
974
1196
```
975
1197
976
1198
977
-
You can create the metric alert using the template and parameters file using PowerShell or Azure CLI from your current working directory
1199
+
You can create the metric alert using the template and parameters file using PowerShell or Azure CLI from your current working directory.
978
1200
979
1201
Using Azure PowerShell
980
1202
```powershell
@@ -1003,7 +1225,7 @@ az group deployment create \
1003
1225
>
1004
1226
> Multiple criteria are not currently supported for metric alert rules that use Dynamic Thresholds.
1005
1227
1006
-
## Template for metric alert that monitors multiple resources
1228
+
## Template for a metric alert that monitors multiple resources
1007
1229
1008
1230
The previous sections described sample Azure Resource Manager templates to create metric alerts that monitor a single resource. Azure Monitor now supports monitoring multiple resources with a single metric alert rule. This feature is currently only supported in Azure public cloud and only for virtual Machines and Databox Edge Devices.
Copy file name to clipboardExpand all lines: articles/azure-monitor/platform/alerts-metric-overview.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -130,7 +130,7 @@ You can specify the scope of monitoring by a single metric alert in one of three
130
130
- all virtual machines (in one Azure region) in one or more resource groups in a subscription
131
131
- all virtual machines (in one Azure region) in one subscription
132
132
133
-
Creating metric alert rules that monitor multiple resources is like [creating any other metric alert](alerts-metric.md) that monitors a single resource. Only difference is that you would select all the resources you want to monitor. You can also create these rules through [Azure Resource Manager templates](../../azure-monitor/platform/alerts-metric-create-templates.md#template-for-metric-alert-that-monitors-multiple-resources). You will receive individual notifications for each virtual machine.
133
+
Creating metric alert rules that monitor multiple resources is like [creating any other metric alert](alerts-metric.md) that monitors a single resource. Only difference is that you would select all the resources you want to monitor. You can also create these rules through [Azure Resource Manager templates](../../azure-monitor/platform/alerts-metric-create-templates.md#template-for-a-metric-alert-that-monitors-multiple-resources). You will receive individual notifications for each virtual machine.
0 commit comments