简体   繁体   中英

App Service health check is 0% even when in browser website returns 200

I have enabled health check with path "/" for App Service slot.
This path in browser and using curl return 200 status code.
But App Service health check status displays 0.00% (Healthy 0 / Degraded 1)
How is this possible?

Just to highlight that if your application depends on a database and a messaging system, the Health check endpoint should connect to those components. If the application can't connect to a critical component, then the path should return a 500-level response code to indicate the app is unhealthy. See: Monitor App Service instances using Health check

Also: Please confirm to make sure that your health check path was added successfully:

From Azure Portal:

  1. To enable Health check, browse to the Azure portal and select your App Service app.
  2. Under Monitoring, select Health check.
  3. Select Enable and provide a valid URL path on your application, such as /health or /api/health .
  4. Select Save.

From Resource url:

You may use the following URL: https://resources.azure.com/ to check that you added the path correctly in your web application.

Follow the steps here:

  1. Go to https://resources.azure.com/

  2. Expand your subscription > Go to Resource Groups > Select the Resource Group where the app service is hosted.

  3. The select providers > Then select Microsoft Web > Open sites And open your app service > Then open config > And lastly web.

  4. You will need to scroll to the bottom to find the variable called 'healthCheckPath' and you will see the value there for the path you set in the portal.

Also refer to this detailed document on Health check here might be helpful: https://learn.microsoft.com/en-us/azure/app-service/monitor-instances-health-check?tabs=do.net#frequently-asked-questions

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM