Metric alert not triggering through arm template unless i deploy an equal metric alert through portal

Hugo Souza Almeida 45 Reputation points
2025-03-06T17:57:53.0566667+00:00

I have a metric alert arm template deploying multiple metric alerts to various virtual machines through dimensions on prod. The filters show that the alerts should have triggered, but the alerts do not trigger unless I deploy a mimick metric alert on sandbox, then it triggers the prod metric alert.

The metric alerts through arm templates do not deploy a log search alert rule, only a metric alert, and the sandbox one does. Maybe its related?

Ex:

Prod

User's image

Sandbox

User's image

Prod:

User's image

Sandbox:

User's image

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
3,502 questions
{count} votes

Accepted answer
  1. Stanislav Zhelyazkov 26,706 Reputation points MVP
    2025-03-07T06:42:55.7433333+00:00

    Hi,

    In order to help can you provide the full ARM template that you use to deploy the metric alert and also the JSON from the metrics alert you have deployed in sandbox? As far as I understood the alert for sandbox you create via Azure Portal where the alert for production you create via ARM template, correct? I am not sure why you have mentioned log alert. There is a screenshot of some log alert but there is no information how it is created and configured. From the screenshots the full information is not clear as parts of the alerts configurations are cut off. Take also into consideration that alert fires if the configured threshold is hit. As it is metric alert you may even be targeting different resources that may result in one hitting the threshold where another it does not which causes one to fire alert and the other to not.

    Update: customer is using old concept for alerts Create a metric alert in Azure Monitor Logs. Recommendation is not to use those type of alerts as those are old concept from early days of Log Analytics alerts when they did not support stateful alerts and 1 minute frequency. I have suggested to use metric alerts or Log alerts to avoid future problems.

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.