Contains general application HealthChecks.
$ dotnet add package NetEvolve.HealthChecksThis package contains additional health checks for the Microsoft.Extensions.Diagnostics.HealthChecks package. Primarily for testing the healthiness of the own application, like application service is started or stopped.
:bulb: This package is available for .NET 8.0 and later.
To use this package, you need to add the package to your project. You can do this by using the NuGet package manager or by using the dotnet CLI.
dotnet add package NetEvolve.HealthChecks
This health check is providing always a Healthy status. It can be used to check if the application is running, like a ping.
This healthcheck does not require any configuration, it will automatically registered as ApplicationHealthy health check.
var builder = services.AddHealthChecks();
builder.AddApplicationHealthy();
This health check is used to check the readiness of the application. It returns Unhealthy until the IHostApplicationLifetime triggers the ApplicationStarted event, then it returns Healthy. It returns Healthy until the IHostApplicationLifetime triggers the ApplicationStopping event, after which it returns Unhealthy.
This healthcheck does not require any configuration, it will automatically registered as ApplicationReady health check.
var builder = services.AddHealthChecks();
builder.AddApplicationReady()
var builder = services.AddHealthChecks();
builder.AddApplicationReady("readiness");
This project is licensed under the MIT License - see the LICENSE file for details.