如何在Azure Portal中的文件或文件夹的编辑/删除上设置警报
我的示例应用程序的日志文件正在在Azure Portal的以下文件夹中创建 d:/home/logfiles/sample_application/sample_application.log
Sample_application.log可以编辑和删除。
当有人试图修改或删除日志文件时,Azure门户中有没有办法触发电子邮件警报?
Log files for my sample application is getting created in the following folder in azure portal
D:/home/LogFiles/sample_application/sample_application.log
sample_application.log can be both edited and deleted.
Is there a way in azure portal to trigger an email alert when someone tries to modify or delete the log file??
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
•是的,您肯定可以使用Azure监视器来配置警报,以通过Kudu控制台或其他某些方式从应用程序服务中删除日志文件。为此,您将必须从Azure Monitors警报窗格中创建一个带有条件'appServiceFileAuditLogs |的警报规则| where OperationName == “Delete” and Path == “D:/home/LogFiles/sample_application/sample_application.log” ' with the action of sending an alert to the email id as registered with this alert rule. Please find下面的链接如何通过Azure Monitor创建警报规则: -
https://learn.microsoft.com/en-us/azure/azure-monitor/alerts/alerts-activity-log
也可以找到下面的快照以供下面参考: -
另外,请确保选择
条件作为'自定义日志搜索'
的下文: -请在下面找到下面的链接关于实现Azure App Service和Azure Monitor
之间的集成的说明: -https://azure.github.io/appservice/2019/11/01/app-service-inpervice-inpercice-integration-with-azure-monitor.html
• Yes, you can surely configure an alert using the Azure Monitor regarding the deletion of the log file from the App service through the kudu console or by some other means. For this purpose, you will have to create an alert rule from the Azure Monitor alerts pane with the condition ‘ AppServiceFileAuditLogs | where OperationName == “Delete” and Path == “D:/home/LogFiles/sample_application/sample_application.log” ’ with the action of sending an alert to the email id as registered with this alert rule. Please find the link below on how to create an alert rule through Azure Monitor: -
https://learn.microsoft.com/en-us/azure/azure-monitor/alerts/alerts-activity-log
Also find the below snapshot below for reference: -
Also, ensure that
condition is selected as ‘Custom Log Search’
for as below: -Please find the link below for detailed instructions on implementing the integration between Azure app service and Azure monitor
: -https://azure.github.io/AppService/2019/11/01/App-Service-Integration-with-Azure-Monitor.html