Class HealthCheckController
The API controller used to display the health check info and execute any actions
Inheritance
System.Object
Microsoft.AspNetCore.Mvc.ControllerBase
Namespace: Umbraco.Cms.Web.BackOffice.HealthChecks
Assembly: Umbraco.Web.BackOffice.dll
Syntax
[Authorize(Policy = "SectionAccessSettings")]
public class HealthCheckController : UmbracoAuthorizedJsonController
Constructors
View SourceHealthCheckController(HealthCheckCollection, ILogger<HealthCheckController>, IOptions<HealthChecksSettings>)
Initializes a new instance of the HealthCheckController class.
Declaration
public HealthCheckController(HealthCheckCollection checks, ILogger<HealthCheckController> logger, IOptions<HealthChecksSettings> healthChecksSettings)
Parameters
Type | Name | Description |
---|---|---|
HealthCheckCollection | checks | |
Microsoft.Extensions.Logging.ILogger<HealthCheckController> | logger | |
Microsoft.Extensions.Options.IOptions<HealthChecksSettings> | healthChecksSettings |
Methods
View SourceExecuteAction(HealthCheckAction)
Executes a given action from a HealthCheck.
Declaration
[HttpPost]
public HealthCheckStatus ExecuteAction(HealthCheckAction action)
Parameters
Type | Name | Description |
---|---|---|
HealthCheckAction | action |
Returns
Type | Description |
---|---|
HealthCheckStatus |
GetAllHealthChecks()
Gets a grouped list of health checks, but doesn't actively check the status of each health check.
Declaration
public object GetAllHealthChecks()
Returns
Type | Description |
---|---|
System.Object | Returns a collection of anonymous objects representing each group. |
GetStatus(Guid)
Gets the status of the HealthCheck with the specified id.
Declaration
[HttpGet]
public async Task<object> GetStatus(Guid id)
Parameters
Type | Name | Description |
---|---|---|
Guid | id |
Returns
Type | Description |
---|---|
Task<System.Object> |