[英]How to check the existance of a Loganalytic alertrule using azure CLI
Is there any way to check the existance of a Loganalytic rule by the alertrulename using Az commands or shell script.有什么方法可以使用 Az 命令或 shell 脚本通过 alertrulename 检查 Loganalytic 规则是否存在。 Looking for some solution where I can check whether the given alertrule name in Azuredevops pipeline runtime paramenter is existing in Azure, if existing skip and if not existing create the alert rule.
寻找一些解决方案,我可以检查 Azuredevops 管道运行时参数中给定的警报规则名称是否存在于 Azure 中,如果存在则跳过,如果不存在则创建警报规则。
You can view all the log alerts in a resource group using the following command:您可以使用以下命令查看资源组中的所有日志警报:
az monitor scheduled-query list -g {ResourceGroup}
For more info please refer Manage log alerts using CLI .有关详细信息,请参阅使用 CLI 管理日志警报。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.