Skip to content

Commit 979242d

Browse files
authored
Update alerts-metric-create-templates.md
1 parent 3e56652 commit 979242d

File tree

1 file changed

+34
-34
lines changed

1 file changed

+34
-34
lines changed

articles/azure-monitor/alerts/alerts-metric-create-templates.md

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ ms.reviewer: harelbr
1616
This article shows how you can use an [Azure Resource Manager template (ARM template)](../../azure-resource-manager/templates/syntax.md) to configure [newer metric alerts](./alerts-metric-near-real-time.md) in Azure Monitor. You can use ARM templates to programmatically set up alerts in a consistent and reproducible way across your environments. Newer metric alerts are currently available in [this set of resource types](./alerts-metric-near-real-time.md#metrics-and-dimensions-supported).
1717

1818
> [!IMPORTANT]
19-
> The resource template for creating metric alerts for resource type Azure Log Analytics workspace, that is, `Microsoft.OperationalInsights/workspaces`, requires more steps. For more information, see [Metric Alerts for Logs - Resource template](./alerts-metric-logs.md#resource-template-for-metric-alerts-for-logs).
19+
> The resource template for creating metric alerts for resource type Azure Log Analytics workspace (that is, `Microsoft.OperationalInsights/workspaces`) requires more steps. For more information, see [Metric Alerts for Logs - Resource template](./alerts-metric-logs.md#resource-template-for-metric-alerts-for-logs).
2020
2121
The basic steps are:
2222

@@ -198,7 +198,7 @@ Save the following JSON script as *simplestaticmetricalert.json* for this walkth
198198
}
199199
```
200200

201-
An explanation of the schema and properties for an alert rule [is available here](/rest/api/monitor/metricalerts/createorupdate).
201+
An explanation of the schema and properties for an alert rule is available [in this article](/rest/api/monitor/metricalerts/createorupdate).
202202

203203
You can set the values for the parameters either on the command line or through a parameter file. A sample parameter file is provided.
204204

@@ -245,7 +245,7 @@ Save the following JSON script as *simplestaticmetricalert.parameters.json* and
245245

246246
You can create the metric alert using the template and parameters file by using PowerShell or the Azure CLI.
247247

248-
Use Azure PowerShell
248+
Azure PowerShell:
249249

250250
```powershell
251251
Connect-AzAccount
@@ -256,7 +256,7 @@ New-AzResourceGroupDeployment -Name AlertDeployment -ResourceGroupName ResourceG
256256
-TemplateFile simplestaticmetricalert.json -TemplateParameterFile simplestaticmetricalert.parameters.json
257257
```
258258

259-
Use the Azure CLI
259+
Azure CLI:
260260

261261
```azurecli
262262
az login
@@ -270,7 +270,7 @@ az deployment group create \
270270

271271
> [!NOTE]
272272
>
273-
> 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.
273+
> Although you can create the metric alert in a resource group that's different from the target resource, we recommend using the same resource group as your target resource.
274274
275275
## Template for a simple Dynamic Thresholds metric alert
276276

@@ -470,7 +470,7 @@ Save the following JSON script as *simpledynamicmetricalert.json* for this walkt
470470
}
471471
```
472472

473-
An explanation of the schema and properties for an alert rule [is available here](/rest/api/monitor/metricalerts/createorupdate).
473+
An explanation of the schema and properties for an alert rule is available [in this article](/rest/api/monitor/metricalerts/createorupdate).
474474

475475
You can set the values for the parameters either on the command line or through a parameter file. A sample parameter file is provided.
476476

@@ -526,7 +526,7 @@ Save the following JSON script as *simpledynamicmetricalert.parameters.json* and
526526

527527
You can create the metric alert using the template and parameters file by using PowerShell or the Azure CLI.
528528

529-
Use Azure PowerShell
529+
Azure PowerShell:
530530

531531
```powershell
532532
Connect-AzAccount
@@ -537,7 +537,7 @@ New-AzResourceGroupDeployment -Name AlertDeployment -ResourceGroupName ResourceG
537537
-TemplateFile simpledynamicmetricalert.json -TemplateParameterFile simpledynamicmetricalert.parameters.json
538538
```
539539

540-
Use the Azure CLI
540+
Azure CLI:
541541

542542
```azurecli
543543
az login
@@ -551,19 +551,19 @@ az deployment group create \
551551

552552
> [!NOTE]
553553
>
554-
> 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.
554+
> Although you can create the metric alert in a resource group that's different from the target resource, we recommend using the same resource group as your target resource.
555555
556556
## Template for a static threshold metric alert that monitors multiple criteria
557557

558-
Newer metric alerts support alerting on multi-dimensional metrics and support defining multiple criteria of up to five criterions per alert rule. You can use the following template to create a more advanced metric alert rule on dimensional metrics and specify multiple criteria.
558+
Newer metric alerts support alerting on multi-dimensional metrics and support defining multiple criteria (up to five per alert rule). You can use the following template to create a more advanced metric alert rule on dimensional metrics and specify multiple criteria.
559559

560560
Note the following constraints when you use dimensions in an alert rule that contains multiple criteria:
561561

562562
- You can only select one value per dimension within each criterion.
563563
- You can't use "\*" as a dimension value.
564-
- 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 in the relevant criterions:
564+
- When metrics that are configured in different criteria support the same dimension, a configured dimension value must be explicitly set in the same way for all those metrics in the relevant criteria:
565565

566-
- In the following example, because both the **Transactions** and **SuccessE2ELatency** metrics have an **ApiName** dimension, and *criterion1* specifies the *"GetBlob"* value for the **ApiName** dimension, then *criterion2* must also set a *"GetBlob"* value for the **ApiName** dimension.
566+
In the following example, because both the **Transactions** and **SuccessE2ELatency** metrics have an **ApiName** dimension, and *criterion1* specifies the *"GetBlob"* value for the **ApiName** dimension, then *criterion2* must also set a *"GetBlob"* value for the **ApiName** dimension.
567567

568568
Save the following JSON script as *advancedstaticmetricalert.json* for this walkthrough.
569569

@@ -768,7 +768,7 @@ Save and modify the following JSON script as *advancedstaticmetricalert.paramete
768768

769769
You can create the metric alert using the template and parameters file by using PowerShell or the Azure CLI from your current working directory.
770770

771-
Use Azure PowerShell
771+
Azure PowerShell:
772772

773773
```powershell
774774
Connect-AzAccount
@@ -779,7 +779,7 @@ New-AzResourceGroupDeployment -Name AlertDeployment -ResourceGroupName ResourceG
779779
-TemplateFile advancedstaticmetricalert.json -TemplateParameterFile advancedstaticmetricalert.parameters.json
780780
```
781781

782-
Use the Azure CLI
782+
Azure CLI:
783783

784784
```azurecli
785785
az login
@@ -988,7 +988,7 @@ Save and modify the following JSON script as *multidimensionalstaticmetricalert.
988988

989989
You can create the metric alert using the template and parameters file by using PowerShell or the Azure CLI from your current working directory.
990990

991-
Use Azure PowerShell
991+
Azure PowerShell:
992992

993993
```powershell
994994
Connect-AzAccount
@@ -999,7 +999,7 @@ New-AzResourceGroupDeployment -Name AlertDeployment -ResourceGroupName ResourceG
999999
-TemplateFile multidimensionalstaticmetricalert.json -TemplateParameterFile multidimensionalstaticmetricalert.parameters.json
10001000
```
10011001

1002-
Use the Azure CLI
1002+
Azure CLI:
10031003

10041004
```azurecli
10051005
az login
@@ -1212,7 +1212,7 @@ Save and modify the following JSON script as *advanceddynamicmetricalert.paramet
12121212

12131213
You can create the metric alert using the template and parameters file by using PowerShell or the Azure CLI from your current working directory.
12141214

1215-
Use Azure PowerShell
1215+
Azure PowerShell:
12161216

12171217
```powershell
12181218
Connect-AzAccount
@@ -1223,7 +1223,7 @@ New-AzResourceGroupDeployment -Name AlertDeployment -ResourceGroupName ResourceG
12231223
-TemplateFile advanceddynamicmetricalert.json -TemplateParameterFile advanceddynamicmetricalert.parameters.json
12241224
```
12251225

1226-
Use the Azure CLI
1226+
Azure CLI:
12271227

12281228
```azurecli
12291229
az login
@@ -1472,7 +1472,7 @@ Save and modify the following JSON script as *customstaticmetricalert.parameters
14721472

14731473
You can create the metric alert using the template and parameters file by using PowerShell or the Azure CLI from your current working directory.
14741474

1475-
Use Azure PowerShell
1475+
Azure PowerShell:
14761476

14771477
```powershell
14781478
Connect-AzAccount
@@ -1483,7 +1483,7 @@ New-AzResourceGroupDeployment -Name AlertDeployment -ResourceGroupName ResourceG
14831483
-TemplateFile customstaticmetricalert.json -TemplateParameterFile customstaticmetricalert.parameters.json
14841484
```
14851485

1486-
Use the Azure CLI
1486+
Azure CLI:
14871487

14881488
```azurecli
14891489
az login
@@ -1807,7 +1807,7 @@ Save and modify the following JSON script as *all-vms-in-resource-group-static.p
18071807

18081808
You can create the static metric alert using the template and parameters file by using PowerShell or the Azure CLI from your current working directory.
18091809

1810-
Use Azure PowerShell
1810+
Azure PowerShell:
18111811

18121812
```powershell
18131813
Connect-AzAccount
@@ -1818,7 +1818,7 @@ New-AzResourceGroupDeployment -Name MultiResourceAlertDeployment -ResourceGroupN
18181818
-TemplateFile all-vms-in-resource-group-static.json -TemplateParameterFile all-vms-in-resource-group-static.parameters.json
18191819
```
18201820

1821-
Use the Azure CLI
1821+
Azure CLI:
18221822

18231823
```azurecli
18241824
az login
@@ -2143,7 +2143,7 @@ Save and modify the following JSON script as *all-vms-in-resource-group-dynamic.
21432143

21442144
You can create the metric alert using the template and parameters file by using PowerShell or the Azure CLI from your current working directory.
21452145

2146-
Use Azure PowerShell
2146+
Azure PowerShell:
21472147

21482148
```powershell
21492149
Connect-AzAccount
@@ -2154,7 +2154,7 @@ New-AzResourceGroupDeployment -Name MultiResourceAlertDeployment -ResourceGroupN
21542154
-TemplateFile all-vms-in-resource-group-dynamic.json -TemplateParameterFile all-vms-in-resource-group-dynamic.parameters.json
21552155
```
21562156

2157-
Use the Azure CLI
2157+
Azure CLI:
21582158

21592159
```azurecli
21602160
az login
@@ -2453,7 +2453,7 @@ Save and modify the following JSON script as *all-vms-in-subscription-static.par
24532453

24542454
You can create the metric alert using the template and parameters file by using PowerShell or the Azure CLI from your current working directory.
24552455

2456-
Use Azure PowerShell
2456+
Azure PowerShell:
24572457

24582458
```powershell
24592459
Connect-AzAccount
@@ -2464,7 +2464,7 @@ New-AzResourceGroupDeployment -Name MultiResourceAlertDeployment -ResourceGroupN
24642464
-TemplateFile all-vms-in-subscription-static.json -TemplateParameterFile all-vms-in-subscription-static.parameters.json
24652465
```
24662466

2467-
Use the Azure CLI
2467+
Azure CLI:
24682468

24692469
```azurecli
24702470
az login
@@ -2786,7 +2786,7 @@ Save and modify the following JSON script as *all-vms-in-subscription-dynamic.pa
27862786

27872787
You can create the metric alert using the template and parameters file by using PowerShell or the Azure CLI from your current working directory.
27882788

2789-
Use Azure PowerShell
2789+
Azure PowerShell:
27902790

27912791
```powershell
27922792
Connect-AzAccount
@@ -2797,7 +2797,7 @@ New-AzResourceGroupDeployment -Name MultiResourceAlertDeployment -ResourceGroupN
27972797
-TemplateFile all-vms-in-subscription-dynamic.json -TemplateParameterFile all-vms-in-subscription-dynamic.parameters.json
27982798
```
27992799

2800-
Use the Azure CLI
2800+
Azure CLI:
28012801

28022802
```azurecli
28032803
az login
@@ -3099,7 +3099,7 @@ Save and modify the following JSON script as *list-of-vms-static.parameters.json
30993099

31003100
You can create the metric alert using the template and parameters file by using PowerShell or the Azure CLI from your current working directory.
31013101

3102-
Use Azure PowerShell
3102+
Azure PowerShell:
31033103

31043104
```powershell
31053105
Connect-AzAccount
@@ -3110,7 +3110,7 @@ New-AzResourceGroupDeployment -Name MultiResourceAlertDeployment -ResourceGroupN
31103110
-TemplateFile list-of-vms-static.json -TemplateParameterFile list-of-vms-static.parameters.json
31113111
```
31123112

3113-
Use the Azure CLI
3113+
Azure CLI:
31143114

31153115
```azurecli
31163116
az login
@@ -3435,7 +3435,7 @@ Save and modify the following JSON script as *list-of-vms-dynamic.parameters.jso
34353435

34363436
You can create the metric alert using the template and parameters file by using PowerShell or the Azure CLI from your current working directory.
34373437

3438-
Use Azure PowerShell
3438+
Azure PowerShell:
34393439

34403440
```powershell
34413441
Connect-AzAccount
@@ -3446,7 +3446,7 @@ New-AzResourceGroupDeployment -Name MultiResourceAlertDeployment -ResourceGroupN
34463446
-TemplateFile list-of-vms-dynamic.json -TemplateParameterFile list-of-vms-dynamic.parameters.json
34473447
```
34483448

3449-
Use the Azure CLI
3449+
Azure CLI:
34503450

34513451
```azurecli
34523452
az login
@@ -3596,7 +3596,7 @@ Save the following JSON script as *availabilityalert.parameters.json* and modify
35963596

35973597
You can create the availability test and associated alert using the template and parameters file by using PowerShell or the Azure CLI.
35983598

3599-
Use Azure PowerShell
3599+
Azure PowerShell:
36003600

36013601
```powershell
36023602
Connect-AzAccount
@@ -3607,7 +3607,7 @@ New-AzResourceGroupDeployment -Name AvailabilityAlertDeployment -ResourceGroupNa
36073607
-TemplateFile availabilityalert.json -TemplateParameterFile availabilityalert.parameters.json
36083608
```
36093609

3610-
Use the Azure CLI
3610+
Azure CLI:
36113611

36123612
```azurecli
36133613
az login

0 commit comments

Comments
 (0)