1

I have added the alert rule and action group manually in the Azure portal to send mail whenever it fails. Is it possible to create these things using the Azure resource manager template?

Ramakrishna Reddy
  • 347
  • 1
  • 2
  • 18

1 Answers1

3

Yes, this tutorial will help you create the alert using ARM template. You can refer to the "simplestaticmetricalert.json" and "simplestaticmetricalert.parameters.json" in this tutorial and replace the parameters in json with your parameters. Then use PowerShell or Azure CLI to deploy the template.

By the way, if you are confused about some parameters in "simplestaticmetricalert.parameters.json", you can use this command below

az monitor metrics alert show [--ids]
                              [--name]
                              [--resource-group]
                              [--subscription]

to show the properties of the alert you have created before for your reference when you edit the new template.

Hury Shen
  • 14,948
  • 1
  • 9
  • 18
  • Is it possible to configure two alerts on the same resource type with different severities in the same arm template – Ramakrishna Reddy Dec 05 '19 at 17:21
  • I'm not sure, but I test it on azure portal. When I create two alerts with different severity, I received the alert email unsteadily. – Hury Shen Dec 06 '19 at 09:38