Package com.atlassian.jira.health
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,Oracle23aiHealthCheck,PostgresSchemaHealthCheck,ProhibitedServerLicenseHealthCheck,PublicSchemaHealthCheck,SecretServiceDisabledStartupCheck,SharedHomeHealthCheck,StandaloneLicenseHealthCheck,SupportedDatabaseVersionHealthCheck,SystemPluginsEnabledHealthCheck,TempDirectoryStartupCheck,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
FieldsModifier and TypeFieldDescriptionstatic final StringBoolean indicating whether an event is blocking start.static final StringChecks which send analytics can provide a short cause which is analytics safe, i.e.static final StringChecks that wish to have analytics events raised (e.g.static final StringBoolean indicating whether an event is dismissible.static final StringThe unique ID of an individual Johnson event arising from aHealthCheck.static final StringChecks 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 StringThe value of theJOHNSON_UI_VERSIONattribute that indicates events are to be displayed in the "Better Johnson" UI added by CPU-59.static final StringThe 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 StringObject to be converted to Json and sent as the value of the 'templateContext' key -
Method Summary
Modifier and TypeMethodDescriptiondefault StringgetId()Returns the unique ID of this check.Returns the checks that must have a non-EventLevel.FATALresult before this check can be run.booleanisApplicableFor(LifecyclePhase phase) Checks if current HealthCheck is applicable for given phaseperform(LifecyclePhase phase) Performs health check for given phase
-
Field Details
-
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
The unique ID of an individual Johnson event arising from aHealthCheck.- See Also:
-
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
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
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
The value of theJOHNSON_UI_VERSIONattribute that indicates events are to be displayed in the "Better Johnson" UI added by CPU-59.- See Also:
-
DISMISSIBLE
Boolean indicating whether an event is dismissible.- See Also:
-
BLOCKING_START
Boolean indicating whether an event is blocking start.- See Also:
-
TEMPLATE_CONTEXT
Object to be converted to Json and sent as the value of the 'templateContext' key- See Also:
-
-
Method Details
-
getId
Returns the unique ID of this check.- Returns:
- a stable, unique, non-blank ID
-
getPrerequisites
Returns the checks that must have a non-EventLevel.FATALresult before this check can be run.- Returns:
- see above
-
perform
Performs health check for given phase- Returns:
- a collection of
HealthCheckResult - Throws:
UnsupportedOperationException
-
isApplicableFor
Checks if current HealthCheck is applicable for given phase- Returns:
- true if HealthCheck is applicable for the phase
-