Metric alerts can be managed with az monitor metrics alert:
az monitor metrics alert -h
Group
az monitor metrics alert : Manage near-realtime metric alert rules.
Commands:
create : Create a metric-based alert rule.
delete : Delete a metrics-based alert rule.
list : List metric-based alert rules.
show : Show a metrics-based alert rule.
update : Update a metric-based alert rule.
I want the same thing for log alerts.
Metric alerts has:
Create, view, and manage metric alerts using Azure Monitor
https://docs.microsoft.com/en-us/azure/azure-monitor/platform/alerts-metric
Log alerts has:
Create, view, and manage log alerts using Azure Monitor
https://docs.microsoft.com/en-us/azure/azure-monitor/platform/alerts-log
Log alerts do not have dedicated PowerShell or CLI commands currently
Thank you for reporting the issue. We already have PS cmdlets available for log alerts.
Azure Monitor Alerts team is working on developing native Azure CLI command support for log alerts (scheduledQueryRules) and we'll revert back to you shortly, with details.
add to backlog.
Would be really go to have this and hoping that it would print the resource id of a log alert that I need to import into terraform state! Guess I'll have to do a manual REST API call ...
Most helpful comment
Would be really go to have this and hoping that it would print the resource id of a log alert that I need to import into terraform state! Guess I'll have to do a manual REST API call ...