Do you have a HealthCheck page (from /zsValidate) to make sure your website is healthy?

Last updated by Brady Stroud [SSW] about 1 month ago.See history

Websites can be complicated, and a very small mistake can take the whole site down. But there are two different kinds of errors, coding errors and deployment errors; coding errors should be picked up by compiling and debugging, while deployment errors should be picked up by the HealthCheck page.

Whenever there is a deployment problem, instead of fixing it straight away, we find out what the cause of the problem is and create a HealthCheck test to prevent it from happening again. So next time, when the site is down or re-deployed to a new server, we can simply run the HealthCheck page and fix all red crosses then the site should be back online.

.NET Core has the ability to add a health check to your application and can be configured for a variety of real-time monitoring scenarios:

  • Health probes can be used by container orchestrators and load balancers to check an app's status. For example, a container orchestrator may respond to a failing health check by halting a rolling deployment or restarting a container. A load balancer might react to an unhealthy app by routing traffic away from the failing instance to a healthy instance.
  • Use of memory, disk, and other physical server resources can be monitored for healthy status.
  • Health checks can test an app's dependencies, such as databases and external service endpoints, to confirm availability and normal functioning.

See more at Health checks in ASP.NET Core.

If you need to add a UI to the health check system - we recommend checking out spNetCore.Diagnostics.HealthChecks Public.

It includes NuGet packages that make it easy to test the health of the lots of different endpoints, and you can push the health check results to different logging platforms e.g. Application Insights, DataDog, etc

It also includes UI (which is themable) and the UI supports automatic discovery of k8s services exposing pods that have health checks endpoints. This means you can benefit from it and avoid registering all the endpoints you want to check and let the UI discover them using the k8s API.

Best of all they have a Release Gate available on the DevOps market place for the release pipelines.

ui branding
Figure: Sample Health Checks page

timeline
Figure: Sample Health of an endpoint being viewed in a timeline, so I can see when a resource was last healthy

Other products using validation status

microsoft service health
Figure: Microsoft Service Health - admin.microsoft.com/servicestatus

google workspace status
Figure: Google Workspace Status Dashboard - www.google.com/appsstatus/dashboard

apple system status
Figure: Apple System Status - www.apple.com/au/support/systemstatus

mailchimp status
Figure: MailChimp status - status.mailchimp.com

See Do you have a HealthCheck page to test your website dependencies?

Figure: Check everything with care

Adam Cogan
Matt Wicks
Jason Taylor
We open source. Powered by GitHub