Creation/updation of Metric alert on Application Insights's Custom metric through ARM should be allowed even if there is no data emitted.
As of today, if there is no data emitted in the past 24 hours for a custom metric at app insights, ARM does not allow to create or update a metric alert and shows "metric name not found" Error.
To create/update an alert we have to wait for the data logging/emitting which does not make sense. It leaves us to perform two ARM deployment while it can be achieved in a single one.
Thanks for bringing this to our attention. Your feedback is now open for the user community to upvote & comment on. This allows us to effectively prioritize your request against our existing feature backlog and also gives us insight into the potential impact of implementing the suggested feature.
Seeing as all metric data is identical in JSON structure, there should be no difference internally between metric alerts that have metrics being logged to and metric alerts without data (or data older than 24 hours). What is the risk here? Why not just implement this, which actually means to just remove the validation. Compare it with the situation where the metric hasn't been logged to for 24 hour, yet it remains working, in case new data arrives. Why prevent creation of metric alerts? We want a single ARM template to deploy both application insights, action groups, logquery alerts and metric alerts.