Where can I find why App Services Health Check is failing?

Ignacio Alvarez Arenas 131 Reputation points Microsoft Employee
2022-11-09T15:08:25.887+00:00

I have configured in my App Services Health Check. When I double check the metric "Health Check Status" I can see that my health check is failing but I cannot determine why. How can I find why Health Check is failing?

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
4,969 questions
0 comments No comments
{count} votes

Accepted answer
  1. ajkuma 15,286 Reputation points Microsoft Employee
    2022-11-11T07:58:57.927+00:00

    @Ignacio Alvarez Arenas ,

    First of all it is important to note that Health Check in App Services determines if something is healthy or not based on getting the status code of 200-299.
    https://learn.microsoft.com/azure/app-service/monitor-instances-health-check?tabs=dotnet#what-app-service-does-with-health-checks

    So for this purpose, in order to identify the kind of reply that our Health Check is getting it is best if we go to the App Service --> Diagnose and Solve Problems and search for Health in the textbox.

    Health check

    It could be found directly as well in Diagnose and Solve Problems --> Availability and Performance --> Health Check Feature.

    If you have Health Check enabled, either under the "Successful Checks" or under "Observations and Solutions" you can find something similar to:

    Health Check -report

    If you click in View Details, there is a graph about the distribution of requests based on status codes and per instance (the Virtual Machine of App Services) which can give you a clear view of what it could be happening. For example, the app for the Health Check path could be returning a redirection, or simply a 500 error.

    Remember that it is expected a code between 200-299. Or another good example would be if one instance in particular is having issues due to any other condition.

    Another option you have if Application Insights is enabled is to check the logs there. If you go to Application Insights --> Logs and run the following query:

    requests
    | where timestamp >= datetime(2022-06-20 06:50:00) and timestamp <= datetime(2022-06-20 20:20:00)
    | project timestamp,name,url,resultCode,duration

    This should give show you the status of requests, so you can see what kind of HTTP status code is returned in the resultCode column.

    0 comments No comments

0 additional answers

Sort by: Most helpful