Table of Contents

Class HealthCheckController

Namespace
Umbraco.Cms.Web.BackOffice.HealthChecks
Assembly
Umbraco.Web.BackOffice.dll

The API controller used to display the health check info and execute any actions

[Authorize(Policy = "SectionAccessSettings")]
public class HealthCheckController : UmbracoAuthorizedJsonController
Inheritance
HealthCheckController
Inherited Members

Constructors

HealthCheckController(HealthCheckCollection, ILogger<HealthCheckController>, IOptions<HealthChecksSettings>)

Initializes a new instance of the HealthCheckController class.

[Obsolete("Use constructor that accepts IEventAggregator as a parameter, scheduled for removal in V14")]
public HealthCheckController(HealthCheckCollection checks, ILogger<HealthCheckController> logger, IOptions<HealthChecksSettings> healthChecksSettings)

Parameters

checks HealthCheckCollection
logger ILogger<HealthCheckController>
healthChecksSettings IOptions<HealthChecksSettings>

HealthCheckController(HealthCheckCollection, ILogger<HealthCheckController>, IOptions<HealthChecksSettings>, IEventAggregator)

Initializes a new instance of the HealthCheckController class.

[ActivatorUtilitiesConstructor]
public HealthCheckController(HealthCheckCollection checks, ILogger<HealthCheckController> logger, IOptions<HealthChecksSettings> healthChecksSettings, IEventAggregator eventAggregator)

Parameters

checks HealthCheckCollection
logger ILogger<HealthCheckController>
healthChecksSettings IOptions<HealthChecksSettings>
eventAggregator IEventAggregator

Methods

ExecuteAction(HealthCheckAction)

Executes a given action from a HealthCheck.

[HttpPost]
public HealthCheckStatus ExecuteAction(HealthCheckAction action)

Parameters

action HealthCheckAction

Returns

HealthCheckStatus

GetAllHealthChecks()

Gets a grouped list of health checks, but doesn't actively check the status of each health check.

public object GetAllHealthChecks()

Returns

object

Returns a collection of anonymous objects representing each group.

GetStatus(Guid)

Gets the status of the HealthCheck with the specified id.

[HttpGet]
public Task<object> GetStatus(Guid id)

Parameters

id Guid

Returns

Task<object>