Skip to content

az monitor metrics alert create doesn't allow metric names to have certain special characters.  #7598

Description

Describe the bug
When the metric name has a '/' in it, CLI ignores the / and sends it to API which cause a metric not found error.

To Reproduce
az monitor metrics alert create -g anashahRG -n SlowBrowserLoad --scopes /subscriptions/ad825170-845c-47db-8f00-11978947b089/resourceGroups/anashahRG/providers/microsoft.insights/components/abvarma --description "average browser load time" --condition "avg browserTimings/totalDuration > 125" --window-size 5m --evaluation-frequency 5m --action /subscriptions/ad825170-845c-47db-8f00-11978947b089/resourcegroups/acmetelco2/providers/microsoft.insights/actiongroups/teste --severity 1
on any application insights resource

Expected behavior
az monitor metrics alert commands need to allow for '/' in the metric name

Environment summary
Install Method = MSI / CLI version = 2.0.46 / OS version = Windows 10 1803 (OS Build 17134.345)/ Shell Type= cmd.exe

Additional context
For a list of metric names see this page. Metric names can have ".","/","_" in them.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Monitor-clibugThis issue requires a change to an existing behavior in the product in order to be resolved.

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions