如何在Azure Portal中的文件或文件夹的编辑/删除上设置警报

发布于 2025-02-09 08:11:07 字数 357 浏览 1 评论 0原文

我的示例应用程序的日志文件正在在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??

Log File Location in Kudu Console

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

渔村楼浪 2025-02-16 08:11:08

•是的,您肯定可以使用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: -

Log query in log analytics workspace

Also, ensure that condition is selected as ‘Custom Log Search’ for as below: -

Azure monitor log alert condition

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文