You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: aspnetcore/host-and-deploy/health-checks.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ The basic configuration registers health check services and calls the Health Che
34
34
35
35
Register health check services with <xref:Microsoft.Extensions.DependencyInjection.HealthCheckServiceCollectionExtensions.AddHealthChecks%2A> in `Program.cs`. Create a health check endpoint by calling <xref:Microsoft.AspNetCore.Builder.HealthCheckEndpointRouteBuilderExtensions.MapHealthChecks%2A>.
36
36
37
-
The following example creates a health check endpoint at `/healthz`:
37
+
The following example creates a health check endpoint at `/healthy`:
@@ -43,10 +43,10 @@ The following example creates a health check endpoint at `/healthz`:
43
43
[Docker](xref:host-and-deploy/docker/index) offers a built-in `HEALTHCHECK` directive that can be used to check the status of an app that uses the basic health check configuration:
The preceding example uses `curl` to make an HTTP request to the health check endpoint at `/healthz`. `curl` isn't included in the .NET Linux container images, but it can be added by installing the required package in the Dockerfile. Containers that use images based on Alpine Linux can use the included `wget` in place of `curl`.
49
+
The preceding example uses `curl` to make an HTTP request to the health check endpoint at `/healthy`. `curl` isn't included in the .NET Linux container images, but it can be added by installing the required package in the Dockerfile. Containers that use images based on Alpine Linux can use the included `wget` in place of `curl`.
50
50
51
51
## Create health checks
52
52
@@ -220,10 +220,10 @@ To create two different health check endpoints, call `MapHealthChecks` twice:
220
220
221
221
The preceding example creates the following health check endpoints:
222
222
223
-
*`/healthz/ready` for the readiness check. The readiness check filters health checks to those tagged with `ready`.
224
-
*`/healthz/live` for the liveness check. The liveness check filters out all health checks by returning `false` in the <xref:Microsoft.AspNetCore.Diagnostics.HealthChecks.HealthCheckOptions.Predicate%2A?displayProperty=nameWithType> delegate. For more information on filtering health checks, see [Filter health checks](#filter-health-checks) in this article.
223
+
*`/healthy/ready` for the readiness check. The readiness check filters health checks to those tagged with `ready`.
224
+
*`/healthy/live` for the liveness check. The liveness check filters out all health checks by returning `false` in the <xref:Microsoft.AspNetCore.Diagnostics.HealthChecks.HealthCheckOptions.Predicate%2A?displayProperty=nameWithType> delegate. For more information on filtering health checks, see [Filter health checks](#filter-health-checks) in this article.
225
225
226
-
Before the startup task completes, the `/healthz/ready` endpoint reports an `Unhealthy` status. Once the startup task completes, this endpoint reports a `Healthy` status. The `/healthz/live` endpoint excludes all checks and reports a `Healthy` status for all calls.
226
+
Before the startup task completes, the `/healthy/ready` endpoint reports an `Unhealthy` status. Once the startup task completes, this endpoint reports a `Healthy` status. The `/healthy/live` endpoint excludes all checks and reports a `Healthy` status for all calls.
227
227
228
228
### Kubernetes example
229
229
@@ -238,7 +238,7 @@ spec:
238
238
readinessProbe:
239
239
# an http probe
240
240
httpGet:
241
-
path: /healthz/ready
241
+
path: /healthy/ready
242
242
port: 80
243
243
# length of time to wait for a pod to initialize
244
244
# after pod startup, before applying health checking
@@ -330,7 +330,7 @@ The advantage of using `MapHealthChecks` over `UseHealthChecks` is the ability t
* Terminating the pipeline when a request matches the health check endpoint, by calling <xref:Microsoft.AspNetCore.Builder.RouteShortCircuitEndpointConventionBuilderExtensions.ShortCircuit%2A>. For example, `app.MapHealthChecks("/healthz").ShortCircuit();`. For more information, see [Short-circuit middleware after routing](../fundamentals/routing.md#short-circuit-middleware-after-routing).
333
+
* Terminating the pipeline when a request matches the health check endpoint, by calling <xref:Microsoft.AspNetCore.Builder.RouteShortCircuitEndpointConventionBuilderExtensions.ShortCircuit%2A>. For example, `app.MapHealthChecks("/healthy").ShortCircuit();`. For more information, see [Short-circuit middleware after routing](../fundamentals/routing.md#short-circuit-middleware-after-routing).
334
334
* Mapping specific routes or endpoints for health checks.
335
335
* Customization of the URL or path where the health check endpoint is accessible.
336
336
* Mapping multiple health check endpoints with different routes or configurations. Multiple endpoint support:
0 commit comments