Azure 资源健康 REST API 响应健康状态与 Web 应用资源类型的门户结果不一致

Azure Resource Health REST API response health status inconsistent with portal result for web app resource type

当我使用 Azure 资源管理 REST API 发送 GET 请求以获取特定订阅 ID 下所有资源的资源健康状态时,如下所示:

https://management.azure.com/subscriptions/subscriptionId/providers/Microsoft.ResourceHealth/availabilityStatuses?api-version=2015-01-01

我收到如下回复:

   {
      "id": "/subscriptions/<subscriptionId>/resourceGroups/<resGrp-name>/providers/Microsoft.Web/sites/<webAppName>/providers/Microsoft.ResourceHealth/availabilityStatuses/current",
      "name": "<webAppName>",
      "type": "Microsoft.ResourceHealth/AvailabilityStatuses",
      "location": "northeurope",
      "properties": {
        "availabilityState": "Unknown",
        "summary": "We are sorry, we are unable to report the health of your Web App",
        "reasonChronicity": "Persistent",
        "recommendedActions": [
          {
            "action": "Continue to monitor this page for updated status",
            "actionUrl": "",
            "actionUrlText": ""
          }
        ],
        "detailedStatus": "No health activity detected on your Azure Web App in past 10 minutes.",
        "occuredTime": "2015-11-18T23:54:59.543Z"
      }
    }

如上所示,特定网络应用程序的可用性状态为“未知”。

然而,在 Azure 门户中,此 Web 应用已被故意暂停超过 15 分钟,以检查 REST API 响应是否与门户中的实际状态一致,预计 return "Stopped" 而不是 "Unknown".

有没有人遇到类似的行为或对此有任何想法?此结果始终可重现,具有相同的意外可用性状态。

非常感谢。

请阅读此博客以了解 "unknown" 状态的含义。 https://azure.microsoft.com/en-in/blog/reduce-troubleshooting-time-with-azure-resource-health/

您提到您的资源在 15 分钟前被访问以暂停网络应用程序。仔细阅读

部分

"Signal latency and other important things to keep in mind"

如果您的资源在过去 10 分钟内未被访问,则其状态变为未知。

您可以尝试使用 Azure service management APIs 检查您的应用程序的状态。

希望对您有所帮助。