【问题标题】:Set a monitoring alert for all the slots of an azure app为 azure 应用的所有插槽设置监控警报
【发布时间】:2016-10-10 20:45:03
【问题描述】:

标题说明了一切。

我有一些 azure 应用程序,每个应用程序有 3 到 4 个部署槽,我想通过制定某种全局警报规则而不是为每个槽和应用程序定义规则来为所有这些应用程序设置服务器错误的监视警报。 有可能吗?

【问题讨论】:

    标签: azure azure-web-app-service azure-deployment-slots azure-monitoring


    【解决方案1】:

    Azure Monitor alerts 仅限于一个 Azure 资源。 如果您想更深入地为多个 Azure 资源定义警报规则,您可以使用Log Analytics 从多个 Azure 资源中收集数据并为多个服务创建一个警报规则。

    简而言之:

    1. 将数据从 Azure 监视器流式传输到 Log Analytics 到 OMS 工作区,请参阅Data sources in log analytics
    2. 创建和alert in Log Analytics 一次

    【讨论】:

      【解决方案2】:

      我们知道,我们可以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"

      【讨论】:

        猜你喜欢
        • 2022-06-20
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2020-02-18
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多