Azure / Azure/azure-cli

Wrong documentation for conditions

Open
#26,881 3 comments 0 reactions 1 assignee Claimed by @AllyW View on GitHub
act-observability-squad Auto-Assign Auto-Resolve Azure CLI Team customer-reported feature-request Monitor
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

### Describe the bug

--condition "avg Percentage CPU > 90" --window-size 5m --evaluation-frequency 1m \ is wrong.
It should be adjusted to:
--condition "avg CpuPercentage > 90" --window-size 5m --evaluation-frequency 1m \.
I have seen this syntax error in multiple documentation pages about az monitor metrics alert.

### Related command

az monitor metrics alert

### Errors

If typed into the CLI:
(BadRequest) Couldn't find a metric named Percentage CPU. Make sure the name is correct.
Code: BadRequest

### Issue script & Debug output

(BadRequest) Couldn't find a metric named Percentage CPU. Make sure the name is correct.
Code: BadRequest

### Expected behavior

Adjusted documentation.

### Environment Summary

azure-cli 2.50.0

core 2.50.0
telemetry 1.0.8

Extensions:
ai-examples 0.2.5
ml 2.18.0
ssh 1.1.6

Dependencies:
msal 1.22.0
azure-mgmt-resource 23.1.0b2

### Additional context

_No response_

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.