Search Results for

    Show / Hide Table of Contents
    View Source

    Class HealthCheck

    Provides a base class for health checks, filling in the healthcheck metadata on construction.

    Inheritance
    object
    Namespace: Umbraco.Cms.Core.HealthChecks
    Assembly: Umbraco.Core.dll
    Syntax
    [DataContract(Name = "healthCheck", Namespace = "")]
    public abstract class HealthCheck : IDiscoverable

    Constructors

    View Source

    HealthCheck()

    Initializes a new instance of the HealthCheck class.

    Declaration
    protected HealthCheck()
    Exceptions
    Type Condition
    InvalidOperationException

    Thrown when the health check does not have a HealthCheckAttribute.

    Properties

    View Source

    Description

    Gets the description of the health check.

    Declaration
    [DataMember(Name = "description")]
    public string? Description { get; }
    Property Value
    Type Description
    string
    View Source

    Group

    Gets the group this health check belongs to.

    Declaration
    [DataMember(Name = "group")]
    public string? Group { get; }
    Property Value
    Type Description
    string
    View Source

    Id

    Gets the unique identifier of the health check.

    Declaration
    [DataMember(Name = "id")]
    public Guid Id { get; }
    Property Value
    Type Description
    Guid
    View Source

    Name

    Gets the name of the health check.

    Declaration
    [DataMember(Name = "name")]
    public string Name { get; }
    Property Value
    Type Description
    string

    Methods

    View Source

    ExecuteAction(HealthCheckAction)

    Executes the action and returns its status.

    Declaration
    public virtual HealthCheckStatus ExecuteAction(HealthCheckAction action)
    Parameters
    Type Name Description
    HealthCheckAction action

    The action to execute.

    Returns
    Type Description
    HealthCheckStatus

    The health check status after executing the action.

    View Source

    ExecuteActionAsync(HealthCheckAction)

    Executes the action asynchronously and returns its status.

    Declaration
    public virtual Task<HealthCheckStatus> ExecuteActionAsync(HealthCheckAction action)
    Parameters
    Type Name Description
    HealthCheckAction action

    The action to execute.

    Returns
    Type Description
    Task<HealthCheckStatus>

    A task that represents the asynchronous operation containing the health check status.

    View Source

    GetStatusAsync()

    Gets the status for this health check.

    Declaration
    public virtual Task<IEnumerable<HealthCheckStatus>> GetStatusAsync()
    Returns
    Type Description
    Task<IEnumerable<HealthCheckStatus>>

    A task that represents the asynchronous operation containing the collection of health check statuses.

    Remarks

    If there are possible actions to take to rectify this check, this method must be overridden by a sub class in order to explicitly provide those actions.

    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX