I looked at my parameters more closely and noticed I was accidentally providing the DB server resourceId as the targetResourceId instead of the DB resourceId. Fixing this solved the issue.
Adding Azure SQL server metric alert via Bicep fails with "Couldn't find a metric named deadlock."
lmp
5
Reputation points
I'm trying to deploy some metrics based alerts, using the sample code provided by the AMBA project. Most of the alerts work fine, but a number of them have the same issue, namely ""Couldn't find a metric named ####. Make sure the name is correct."
where #### is the name of the metric
- The metrics do exist
- they are visible in Azure Monitor metric explorer
- I can manually create the metrics alerts in the portal
- the issue comes up only when deploying with Bicep
- The resources that the alerts are related to already exist, so it shouldn't be a race condition
- The metrics I have issues with are
- dtu_limit (sql server)
- deadlock (sql server)
- connection_failed (sql server)
- CpuUtilization (application gateway)
- Some metrics that work without issue
- dtu_used (sql server)
- FailedRequests (application gateway)
Any tips?
2 answers
Sort by: Most helpful
-
-
Deleted
This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.
Comments have been turned off. Learn more