"mismatched input '/' expecting WHITESPACE" - az monitor metrics alert create throws error when specifying dimension availabilityResult/name #30755
Labels
Auto-Assign
Auto assign by bot
Azure CLI Team
The command of the issue is owned by Azure CLI team
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
Monitor
az monitor
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Similar-Issue
Milestone
Describe the bug
Tested on version 2.57.0 and 2.68.0 (latest release)
I'm trying to create a metric alert which will fire if a standard web-test availability metric goes below 100%.
If I do not add a dimension, the rule creates successfully, with no errors.
If I add a dimension for Test Name, the azure cli seems to trip up on the required "/" in
availabilityResult/name
I've tried escaping this using
\
,//
,(availabilityResult/name)
,[availabilityResult].name
,availabilityResult.name
but no luck.Weirdly, despite the error print out, the rule does go off and create the dimension and alert rule successfully.
Related command
az monitor metrics alert create
Errors
Issue script & Debug output
Expected behavior
No error returned as "/" is valid.
It might be related to similar problems that were addressed in versions:
2.2.0 - az monitor metrics alert create: support ~ in --condition
2.50.0 - az monitor metrics alert create: Add () into --condition grammar
Maybe we need a new release that adds support for "/" in the condition grammar?
Environment Summary
azure-cli 2.68.0
core 2.68.0
telemetry 1.1.0
Extensions:
aks-preview 0.5.136
application-insights 0.1.15
azure-devops 0.25.0
kusto 0.5.0
Dependencies:
msal 1.31.1
azure-mgmt-resource 23.1.1
Python location 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe'
Extensions directory 'C:\Users\tscamell.azure\cliextensions'
Python (Windows) 3.12.8 (tags/v3.12.8:2dc476b, Dec 3 2024, 19:07:15) [MSC v.1942 32 bit (Intel)]
Legal docs and information: aka.ms/AzureCliLegal
Your CLI is up-to-date.
Additional context
No response
The text was updated successfully, but these errors were encountered: