简体   繁体   English

使用Azure CLI列出Azure监视器中的所有警报规则

[英]List all Alert rules in Azure monitor using Azure CLI

I am trying to list all the Alert rules that I have created in Azure Monitor using the Azure CLI so that I can enable/disable them as per need. 我试图列出我使用Azure CLI在Azure Monitor中创建的所有警报规则,以便我可以根据需要启用/禁用它们。 Is there a way to achieve this programmatically using the Azure CLI? 有没有办法使用Azure CLI以编程方式实现这一目标?

Try the command below, more details refer to this link . 请尝试以下命令,更多详细信息请参考此链接

az monitor alert list --resource-group

Or you can use az monitor metrics alert list to list metric-based alert rules. 或者,您可以使用az monitor metrics alert list列出基于指标的警报规则。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM