HealthCheckService HealthCheckService HealthCheckService Class

Definition

A service which can be used to check the status of IHealthCheck instances registered in the application.

public abstract class HealthCheckService
type HealthCheckService = class
Public MustInherit Class HealthCheckService
Inheritance
HealthCheckServiceHealthCheckServiceHealthCheckService

Remarks

The default implementation of HealthCheckService is registered in the dependency injection container as a singleton service by calling AddHealthChecks(IServiceCollection).

The IHealthChecksBuilder returned by AddHealthChecks(IServiceCollection) provides a convenience API for registering health checks.

IHealthCheck implementations can be registered through extension methods provided by IHealthChecksBuilder.

Constructors

HealthCheckService() HealthCheckService() HealthCheckService()

Methods

CheckHealthAsync(CancellationToken) CheckHealthAsync(CancellationToken) CheckHealthAsync(CancellationToken)

Runs all the health checks in the application and returns the aggregated status.

CheckHealthAsync(Func<HealthCheckRegistration,Boolean>, CancellationToken) CheckHealthAsync(Func<HealthCheckRegistration,Boolean>, CancellationToken) CheckHealthAsync(Func<HealthCheckRegistration,Boolean>, CancellationToken)

Runs the provided health checks and returns the aggregated status

Applies to