如何使用 azure CLI 检查 Loganalytic 警报规则是否存在
有没有办法使用 Az 命令或 shell 脚本通过警报规则名称检查 Loganalytic 规则是否存在。寻找一些解决方案,我可以检查 Azuredevops 管道运行时参数中给定的警报规则名称是否存在于 Azure 中,如果存在则跳过,如果不存在则创建警报规则。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用以下命令查看资源组中的所有日志警报:
有关详细信息,请参阅 使用 CLI 管理日志警报。
You can view all the log alerts in a resource group using the following command:
For more info please refer Manage log alerts using CLI.