Azure-cli: Create, view, and manage log alerts

Created on 28 Feb 2019  路  3Comments  路  Source: Azure/azure-cli

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

Monitor - Alerts New Command(s) feature-request

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 ...

All 3 comments

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 ...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dhermans picture dhermans  路  3Comments

Kannaj picture Kannaj  路  3Comments

ambakshi picture ambakshi  路  3Comments

derekperkins picture derekperkins  路  3Comments

PrHar picture PrHar  路  3Comments