Interface HealthCheck

All Known Implementing Classes:
AbstractHealthCheck, BuildVersionCheck, CollationHealthCheck, CustomisedConfigurationsHealthCheck, DatabaseSecretStoreRetrievalHealthCheck, DbConfigurationAndConnectionCheck, FakeHealthCheck, FileStoreConfigurationHealthCheck, FileStoreConnectionHealthCheck, HealthCheckTemplate, JdbcDriverHealthCheck, JiraHomeHealthCheck, MinimumUpgradableVersionHealthCheck, MinMemoryHealthCheck, MSSQLDriverMigrationHealthCheck, MySql8ModeHealthCheck, MySQLHealthCheckTemplate, MySqlJdbcUrlHealthCheck, NodeIdHealthCheck, PostgresSchemaHealthCheck, ProhibitedServerLicenseHealthCheck, PublicSchemaHealthCheck, SharedHomeHealthCheck, StandaloneLicenseHealthCheck, SupportedDatabaseVersionHealthCheck, SystemPluginsEnabledHealthCheck, TomcatConfigurationHealthCheck, UnsupportedHsqlHealthCheck

public interface HealthCheck
A health check performed by JIRA during some phase (or phases) of its lifecycle. A check should:
  • Return an empty collection on success.
  • Return a non-empty collection otherwise, e.g. failure.
  • Throw an exception if called during not applicable phase
  • Check things that prevent startup or otherwise require attention from the administrator.
  • Not check things that JIRA can fix by itself (e.g. creating a needed directory).
  • Be short-running, because it is invoked synchronously.
  • Release any acquired resources before returning from its perform(LifecyclePhase) method.
  • Not have side-effects (e.g. logging its own Johnson events).
Since:
7.4
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Boolean indicating whether an event is blocking start.
    static final String
    Checks which send analytics can provide a short cause which is analytics safe, i.e.
    static final String
    Checks that wish to have analytics events raised (e.g.
    static final String
    Boolean indicating whether an event is dismissible.
    static final String
    The unique ID of an individual Johnson event arising from a HealthCheck.
    static final String
    Checks that wish to provide a help link to public-facing documentation should set this attribute to the relevant URL on the Johnson event that they return.
    static final String
    The value of the JOHNSON_UI_VERSION attribute that indicates events are to be displayed in the "Better Johnson" UI added by CPU-59.
    static final String
    The Johnson event attribute that if present specifies what version of the Johnson UI is meant to display the events returned by this executor.
    static final String
    Object to be converted to Json and sent as the value of the 'templateContext' key
  • Method Summary

    Modifier and Type
    Method
    Description
    default String
    Returns the unique ID of this check.
    Returns the checks that must have a non-EventLevel.FATAL result before this check can be run.
    boolean
    Checks if current HealthCheck is applicable for given phase
    Performs health check for given phase
  • Field Details

    • CHECK_ID_KEY

      static final String CHECK_ID_KEY
      Checks that wish to have analytics events raised (e.g. about their success or failure) should set this attribute to a unique key, e.g. "my-db-check". The value of this key should remain stable for as long as this check is defined.
      See Also:
    • EVENT_ID_KEY

      static final String EVENT_ID_KEY
      The unique ID of an individual Johnson event arising from a HealthCheck.
      See Also:
    • HELP_URL_KEY

      static final String HELP_URL_KEY
      Checks that wish to provide a help link to public-facing documentation should set this attribute to the relevant URL on the Johnson event that they return.
      See Also:
    • CAUSE_KEY

      static final String CAUSE_KEY
      Checks which send analytics can provide a short cause which is analytics safe, i.e. does not contain any user data.
      See Also:
    • JOHNSON_UI_VERSION

      static final String JOHNSON_UI_VERSION
      The Johnson event attribute that if present specifies what version of the Johnson UI is meant to display the events returned by this executor.
      See Also:
    • INTERACTIVE_JOHNSON

      static final String INTERACTIVE_JOHNSON
      The value of the JOHNSON_UI_VERSION attribute that indicates events are to be displayed in the "Better Johnson" UI added by CPU-59.
      See Also:
    • DISMISSIBLE

      static final String DISMISSIBLE
      Boolean indicating whether an event is dismissible.
      See Also:
    • BLOCKING_START

      static final String BLOCKING_START
      Boolean indicating whether an event is blocking start.
      See Also:
    • TEMPLATE_CONTEXT

      static final String TEMPLATE_CONTEXT
      Object to be converted to Json and sent as the value of the 'templateContext' key
      See Also:
  • Method Details