Skip to content

Commit 8d88c1e

Browse files
authored
Update alerts-create-new-alert-rule.md
adding Arg example
1 parent d6e15be commit 8d88c1e

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

articles/azure-monitor/alerts/alerts-create-new-alert-rule.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,12 +144,16 @@ To edit an existing alert rule:
144144

145145
To use one of the predefined alert rule queries, expand the **Schema and filter** pane on the left of the **Logs** pane. Then select the **Queries** tab, and select one of the queries.
146146

147-
1. (Optional) If you're querying an ADX cluster, Log Analytics can't automatically identify the column with the event timestamp, so we recommend that you add a time range filter to the query. For example:
148-
```azurecli
147+
1. (Optional) If you're querying an ADX or ARG cluster, Log Analytics can't automatically identify the column with the event timestamp, so we recommend that you add a time range filter to the query. For example:
148+
```KQL
149149
adx(cluster).table
150150
| where MyTS >= ago(5m) and MyTS <= now()
151151
```
152-
152+
```KQL
153+
arg("").Resources
154+
| where type =~ 'Microsoft.Compute/virtualMachines'
155+
| project _ResourceId=tolower(id), tags
156+
```
153157
:::image type="content" source="media/alerts-create-new-alert-rule/alerts-logs-conditions-tab.png" alt-text="Screenshot that shows the Condition tab when creating a new log alert rule.":::
154158
155159
1. Select **Run** to run the alert.

0 commit comments

Comments
 (0)