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-action-rules.md
+32-54Lines changed: 32 additions & 54 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,11 +2,11 @@
2
2
title: Alert processing rules for Azure Monitor alerts
3
3
description: Understanding what alert processing rules in Azure Monitor are and how to configure and manage them.
4
4
ms.topic: conceptual
5
-
ms.date: 11/11/2021
5
+
ms.date: 02/02/2022
6
6
7
7
---
8
8
9
-
# Alert processing rules (preview)
9
+
# Alert processing rules
10
10
11
11
<aname="configuring-an-action-rule"></a>
12
12
<aname="suppression-of-alerts"></a>
@@ -98,7 +98,7 @@ You may optionally control when will the rule apply. By default, the rule is app
98
98
### [Portal](#tab/portal)
99
99
100
100
You can access alert processing rules by navigating to the **Alerts** home page in Azure Monitor.
101
-
Once there, you can click **Alert processing rules (preview)** to see and manage your existing rules, or click **Create** --> **Alert processing rules (preview)** to open the new alert processing rule wizard.
101
+
Once there, you can click **Alert processing rules** to see and manage your existing rules, or click **Create** --> **Alert processing rules** to open the new alert processing rule wizard.
102
102
103
103

104
104
@@ -124,80 +124,61 @@ In the fourth tab (**Details**), you give this rule a name, pick where it will b
124
124
125
125
### [Azure CLI](#tab/azure-cli)
126
126
127
-
> [!NOTE]
128
-
> The Azure CLI is in the process of being updated to leverage the GA API of alert processing rules. Until then, you can use existing CLI capabilities under the **action rule** command to create alert processing rules. Meanwhile, the existing CLI does not support some of the newer alert processing rules features.
129
-
130
-
You can create alert processing rules with the Azure CLI using the [az monitor action-rule create](/cli/azure/monitor/action-rule#az_monitor_action_rule_create) command. The `az monitor action-rule` reference is just one of many [Azure CLI references for Azure Monitor](/cli/azure/azure-cli-reference-for-monitor).
127
+
You can use the Azure CLI to work with alert processing rules. See the `az monitor alert-processing-rules` page in the [Azure CLI docs](/cli/azure/monitor/alert-processing-rule) for detailed documentation and examples.
131
128
132
129
### Prepare your environment
133
130
134
-
1.[Install the Azure CLI](/cli/azure/install-azure-cli)
131
+
1.**Install the Auzre CLI**
132
+
133
+
Follow the [Installation instructions for the Azure CLI](/cli/azure/install-azure-cli).
135
134
136
-
If you prefer, you can also use Azure Cloud Shell to complete the steps in this article. Azure Cloud Shell is an interactive shell environment that you use through your browser. Start Cloud Shell by using one of these methods:
135
+
Alternatively, you can use Azure Cloud Shell, which is an interactive shell environment that you use through your browser. To start a Cloud Shell:
137
136
138
137
- Open Cloud Shell by going to [https://shell.azure.com](https://shell.azure.com)
139
138
140
139
- Select the **Cloud Shell** button on the menu bar at the upper right corner in the [Azure portal](https://portal.azure.com)
141
140
142
-
1. Sign in.
141
+
1.**Sign in**
143
142
144
-
If you're using a local install of the CLI, sign in using the [az login](/cli/azure/reference-index#az_login) command. Follow the steps displayed in your terminal to complete the authentication process.
143
+
If you're using a local installation of the CLI, sign in using the [az login](/cli/azure/reference-index#az-login) command. Follow the steps displayed in your terminal to complete the authentication process.
145
144
146
145
```azurecli
147
146
az login
148
147
```
149
148
150
-
1. Install the `alertsmanagement` extension
149
+
1. **Install the `alertsmanagement` extension**
151
150
152
-
The `az monitor action-rule` command is an experimental extension of the core Azure CLI. Learn more about extension references in [Use extension with Azure CLI](/cli/azure/azure-cli-extensions-overview?).
151
+
In order to use the `az monitor alert-processing-rule` commands, install the `alertsmanagement` preview extension.
153
152
154
153
```azurecli
155
154
az extension add --name alertsmanagement
156
155
```
157
156
158
-
The following warning is expected.
157
+
The following output is expected.
159
158
160
159
```output
161
-
The installed extension `alertsmanagement` is experimental and not covered by customer support. Please use with discretion.
160
+
The installed extension 'alertsmanagement' is in preview.
162
161
```
162
+
163
+
To learn more about Azure CLI extensions, check [Use extension with Azure CLI](/cli/azure/azure-cli-extensions-overview?).
163
164
164
165
### Create an alert processing rule with the Azure CLI
165
166
166
-
See the Azure CLI reference content for [az monitor action-rule create](/cli/azure/monitor/action-rule#az_monitor_action_rule_create) to learn about required and optional parameters.
167
-
168
-
Create an alert processing rule to suppress notifications in a resource group.
167
+
Use the `az monitor alert-processing-rule create` command to create alert processing rules.
168
+
For example, to create a rule that adds an action group to all alerts in a subscription, run:
169
169
170
170
```azurecli
171
-
az monitor action-rule create --resource-group MyResourceGroupName \
The [CLI documentation](/cli/azure/monitor/alert-processing-rule#az-monitor-alert-processing-rule-create) include more examples and an explanation of each parameter.
201
182
202
183
* * *
203
184
@@ -213,25 +194,22 @@ From here, you can enable, disable, or delete alert processing rules at scale by
213
194
214
195
### [Azure CLI](#tab/azure-cli)
215
196
216
-
> [!NOTE]
217
-
> The Azure CLI is in the process of being updated to leverage the GA API of alert processing rules. Until then, you can use existing CLI capabilies under the **action rule** command to create alert processing rules. Meanwhile, the existing CLI does not support some of the newer alert processing rules features.
218
-
219
-
You can view and manage your alert processing rules using the [az monitor action-rule](/cli/azure/monitor) command from the Azure CLI.
197
+
You can view and manage your alert processing rules using the [az monitor alert-processing-rules](/cli/azure/monitor/alert-processing-rule) commands from Azure CLI.
220
198
221
199
Before you manage alert processing rules with the Azure CLI, prepare your environment using the instructions provided in [Configuring an alert processing rule](#configuring-an-alert-processing-rule).
222
200
223
201
```azurecli
224
202
# List all alert processing rules for a subscription
225
-
az monitor action-rule list
203
+
az monitor alert-processing-rules list
226
204
227
205
# Get details of an alert processing rule
228
-
az monitor action-rule show --resource-group MyResourceGroupName --name MyActionRuleName
206
+
az monitor alert-processing-rules show --resource-group MyResourceGroupName --name MyRule
229
207
230
208
# Update an alert processing rule
231
-
az monitor action-rule update --resource-group MyResourceGroupName --name MyActionRuleName --status Disabled
209
+
az monitor alert-processing-rules update --resource-group MyResourceGroupName --name MyRule --status Disabled
232
210
233
211
# Delete an alert processing rule
234
-
az monitor action-rule delete --resource-group MyResourceGroupName --name MyActionRuleName
212
+
az monitor alert-processing-rules delete --resource-group MyResourceGroupName --name MyRule
0 commit comments