如何在Azure订阅中创建任何资源时获取警报。 [英] How to get an alert whenever any resource is created in the Azure subscription.

查看:55
本文介绍了如何在Azure订阅中创建任何资源时获取警报。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我需要为任何资源创建创建一个警报&发送给管理员。

I need to create an alert for any resource creation & send it to the admin.

我尝试使用策略,但失败了。请指导我。

I tried this using policy, but failed. Please guide me in this.

谢谢

Jeetu

Jeetu

推荐答案


您可以尝试在订阅级别为"创建部署(部署)"操作设置活动日志警报。每当创建资源时都会生成此事件,但是,可能存在例外情况,例如
资源组,您需要为其创建单独的警报。

以下是有关如何创建活动日志提醒的文档。  您可以将订阅设置为目标并选择'创建部署(部署)的标准。

https://docs.microsoft.com/en-us/azure/azure-monitor/platform/alerts-activity-log#create-with-azure-portal  

注意: 

对于活动日志中的创建部署事件,似乎资源名称未记录在活动日志事件中,因此,您没有获得名称在警报电子邮件中。不幸的是,如果您只需为所有资源创建或删除创建一个警报,则没有
的解决方法。
 

或者,您可以为每种资源类型创建单独的警报监视该资源类型的创建/删除操作,例如存储帐户。这也将指定资源名称。 

我确实理解这很麻烦,但是,您可以对此功能请求进行投票 -   < a href ="https://feedback.azure.com/forums/231545-diagnostics-and-monitoring/suggestions/33754762-alert-whenever-a-new-vm-or-resource-is-created"style ="color :#0000aa"> https://feedback.azure.com/forums/231545-diagnostics-and-monitoring/suggestions/33754762-alert-whenever-a-new-vm-or-resource-is-created
,供产品团队考虑此近期功能开发请求。

I do understand this is troublesome, however, you can up vote this feature request - https://feedback.azure.com/forums/231545-diagnostics-and-monitoring/suggestions/33754762-alert-whenever-a-new-vm-or-resource-is-created for product team to consider this request for the near feature development.

如果您的目的是限制用户创建资源或在特定资源中创建资源小组,您可以尝试RBAC。

If your intent is to restrict users from creating resources or to create resources in a specific resource group, you may try RBAC.


这篇关于如何在Azure订阅中创建任何资源时获取警报。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆