The preceding example uses curl to make an HTTP request to the health check endpoint at /healthz. The following example creates a health check endpoint at /healthz: var builder = WebApplication.CreateBuilder(args) ĭocker offers a built-in HEALTHCHECK directive that can be used to check the status of an app that uses the basic health check configuration: HEALTHCHECK CMD curl -fail || exit Create a health check endpoint by calling MapHealthChecks. Register health check services with AddHealthChecks in Program.cs. The HealthStatus is HealthStatus.Healthy, HealthStatus.Degraded, or HealthStatus.Unhealthy. The default response writer writes HealthStatus as a plaintext response to the client. The app is considered healthy if it can respond at the health endpoint URL. By default, no specific health checks are registered to test any particular dependency or subsystem. The basic configuration registers health check services and calls the Health Checks Middleware to respond at a URL endpoint with a health response. Basic health probeįor many apps, a basic health probe configuration that reports the app's availability to process requests ( liveness) is sufficient to discover the status of the app. #MINIMUM DELAY COVERLOAD DEPENDENT DELAY HOW TO#The monitoring system dictates what types of health checks to create and how to configure their endpoints. Before adding health checks to an app, decide on which monitoring system to use. Health checks are typically used with an external monitoring service or container orchestrator to check the status of an app.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |