***

title: "HealthCheckStrategy"
generated: true
---------------

<GenerationInfo sourceFile="packages/core/src/config/system/health-check-strategy.ts" sourceLine="46" packageName="@vendure/core" />

This strategy defines health checks which are included as part of the
`/health` endpoint. They should only be used to monitor *critical* systems
on which proper functioning of the Vendure server depends.

Custom strategies should be added to the `systemOptions.healthChecks` array.
By default, Vendure includes the `TypeORMHealthCheckStrategy`, so if you set the value of the `healthChecks`
array, be sure to include it manually.

Vendure also ships with the [HttpHealthCheckStrategy](/current/core/reference/typescript-api/health-check/http-health-check-strategy#httphealthcheckstrategy), which is convenient
for adding a health check dependent on an HTTP ping.

:::info

This is configured via the `systemOptions.healthChecks` property of
your VendureConfig.

:::

*Example*

```ts
import { HttpHealthCheckStrategy, TypeORMHealthCheckStrategy } from '@vendure/core';
import { MyCustomHealthCheckStrategy } from './config/custom-health-check-strategy';

export const config = {
  // ...
  systemOptions: {
    healthChecks: [
      new TypeORMHealthCheckStrategy(),
      new HttpHealthCheckStrategy({ key: 'my-service', url: 'https://my-service.com' }),
      new MyCustomHealthCheckStrategy(),
    ],
  },
};
```

```ts title="Signature"
interface HealthCheckStrategy extends InjectableStrategy {
    getHealthIndicator(): HealthIndicatorFunction;
}
```

* Extends: [`InjectableStrategy`](/current/core/reference/typescript-api/common/injectable-strategy#injectablestrategy)

<div className="members-wrapper">

### getHealthIndicator

\<MemberInfo kind="method" type={`() => <a href='/current/core/reference/typescript-api/health-check/health-indicator-function#healthindicatorfunction'>HealthIndicatorFunction</a>`}   />

Should return a [HealthIndicatorFunction](/current/core/reference/typescript-api/health-check/health-indicator-function#healthindicatorfunction) which performs the check
and resolves to a status payload.

</div>
