简体   繁体   中英

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

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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