【发布时间】:2016-10-10 20:45:03
【问题描述】:
标题说明了一切。
我有一些 azure 应用程序,每个应用程序有 3 到 4 个部署槽,我想通过制定某种全局警报规则而不是为每个槽和应用程序定义规则来为所有这些应用程序设置服务器错误的监视警报。 有可能吗?
【问题讨论】:
标签: azure azure-web-app-service azure-deployment-slots azure-monitoring
标题说明了一切。
我有一些 azure 应用程序,每个应用程序有 3 到 4 个部署槽,我想通过制定某种全局警报规则而不是为每个槽和应用程序定义规则来为所有这些应用程序设置服务器错误的监视警报。 有可能吗?
【问题讨论】:
标签: azure azure-web-app-service azure-deployment-slots azure-monitoring
Azure Monitor alerts 仅限于一个 Azure 资源。 如果您想更深入地为多个 Azure 资源定义警报规则,您可以使用Log Analytics 从多个 Azure 资源中收集数据并为多个服务创建一个警报规则。
简而言之:
【讨论】:
我们知道,我们可以use the Azure portal, PowerShell or the Command Line Interface etc to create alerts rule 来监控 Azure 资源指标、事件或日志。而且我们需要为我们想要设置和提醒的资源指定Resource ID,以及具有不同Resource ID 的不同资源,因此我们无法创建一个全局警报规则来监控我们所有的网络应用程序和插槽。
资源 ID 可能如下所示。
网络应用:
"id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/YourResourceGroupName/providers/Microsoft.Web/sites/websitename"
网络应用槽:
"id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/YourResourceGroupName/providers/Microsoft.Web/sites/websitename/slots/slotname"
【讨论】: