azure-cli icon indicating copy to clipboard operation
azure-cli copied to clipboard

Time aggregation must be one of [Count]

Open jordanchang opened this issue 7 years ago • 1 comments

I'm trying to create an alert on my app insights but getting the error message, "Time aggregation must be one of [Count]"

Here's my command.

az monitor metrics alert create -n "Failed Requests" -g $rgName --scopes $appInsightsId --condition "avg requests/failed > 50" --window-size 5m --evaluation-frequency 1m --description "Failed Requests"


Document Details

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

jordanchang avatar Apr 01 '19 19:04 jordanchang

Your condition needs to be --condition "count requests/failed > 50"

However, that will fail. I will submit a PR that will permit this for the upcoming release (next Tuesday)

tjprescott avatar Apr 02 '19 16:04 tjprescott