Add ability to export definition of an alert as a JSON template for ARM
The template indeed can be exported but it's hidden very well. Here is how to find it:
1. Navigate to "All resources" in the Azure portal.
2. Tick the "Show hidden types" checkbox.
3. Search for the name of your alert rule
4. Click on the alert and use the "Export template" blade of the resource.
(This really should be in the MS docs...)
this does not appear to be available.
Any update regarding this issue? I still don't see a way to export a template for Alerts and they are not included when you export ARM Template in AzureDataFactory.
I still don't see a way to export a template for Alerts. Any update?
Feature doesn't appear to be available still. Any updates from the Azure Alert Team?
Any updates as still unable to export alerts?
Phill Dellow commented
This would be really useful in my present task
Adam Reynolds commented
This is particularly bad because it *pretends* to work when you hit "Export Template", but the resulting template is missing all alert criteria.
Sam Smith commented
This is crazy this isn't a feature. I used Azure Az to get the criteria as a workaround: https://docs.microsoft.com/en-us/cli/azure/monitor/metrics/alert?view=azure-cli-latest#az-monitor-metrics-alert-show
Christian Eder commented
As a workaround: you can create the alert manually, and the use the creation notification on the top right corner of the portal to go to the activity log. In the details of the alert creation activity log entry, you'll find the actual ARM template JSON for the alert in the "requestbody" body property.