Multiple resources in a metric alert scope doesn't work as expected
We've created new Metric Alerts via an ARM template (as documented here: https://docs.microsoft.com/en-us/azure/monitoring-and-diagnostics/monitoring-create-metric-alerts-with-templates and https://docs.microsoft.com/en-us/rest/api/monitor/metricalerts/createorupdate)
If we pass multiple resources in the scopes array, we see three unexpected behaviours:
1) The alert only fires for the first resource in the array
2) The Monitor ui on the portal shows no alert definitions, unless you enable the new portal experience.
3) The new portal experience only shows a single resource being monitored
Retrieving the alert definitions from the REST API shows that the multiple resources in the scope have indeed been successfully stored.
I see now this: https://github.com/MicrosoftDocs/azure-docs/issues/10396
It is intended not to work. Thats very confusing. Either make it a string instead of array, or build the loop so that the alert definitions can be set vor multiple resources at once
I encountered the same issue, although I do not see in the REST API that all intended alert definitions have been created. I only see the alert definitions for the firrst ResourceID in the scopes array have been created
Rajinder Singh commented
We experienced this bug today. It should be fixed
Aditi Maheshwari commented
Using portal we can create alerts on multiple resources but via arm or terraform we are not able to do this as scops is accepting a single resource only.
need a solution for this.
Is this fixed already?