Azure / Azure/azure-cli

Add example with condition using where entityname

Open
#15,923 1 comment 0 reactions 2 assignees Claimed by @Jing-song View on GitHub
act-observability-squad Example feature-request Monitor
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

Please add an alert example where the condition includes an entity name. I couldn't find an example anywhere and this seems to be quite a useful condition to use.

For example
az monitor metrics alert create -n "Event Hub Output Flatline - {EventHub}" --target-resource-type Microsoft.EventHub/namespaces --resource-group {ResourceGroup} \
--scopes {EventHubNamespaceID} \
--condition "avg OutgoingMessages < 100 where EntityName includes {EventHub}" \

---
#### Document Details

⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*

* ID: d97968df-72c9-e50c-d5b1-54562c1bdef7
* Version Independent ID: 0cde4f15-6464-3106-b787-3ee37c7de0ee
* Content: [az monitor metrics alert](https://docs.microsoft.com/en-us/cli/azure/monitor/metrics/alert?view=azure-cli-latest#az_monitor_metrics_alert_create)
* Content Source: [latest/docs-ref-autogen/monitor/metrics/alert.yml](https://github.com/MicrosoftDocs/azure-docs-cli/blob/master/latest/docs-ref-autogen/monitor/metrics/alert.yml)
* Service: **monitoring-and-diagnostics**
* GitHub Login: @rloutlaw
* Microsoft Alias: **routlaw**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.