Documentation
    Preparing search index...

    The HealthChecks acts as a repository and a runner to register/execute health checks.

    const healthChecks = new HealthChecks()

    healthChecks.register([
    new DiskSpaceCheck().warnWhenExceeds(70).failWhenExceeds(85),
    new MemoryHeapCheck().warnWhenExceeds('200 mb').failWhenExceeds('500 mb')
    ])

    const report = await healthChecks.run()
    console.log(report.isHealthy) // true or false
    Index

    Constructors

    Methods

    Constructors

    Methods

    • Executes all the checks in parallel and returns the health check report

      Returns Promise<HealthCheckReport>

      const healthChecks = new HealthChecks()
      const report = await healthChecks.run()

      console.log(report.isHealthy) // true or false
      console.log(report.status) // 'ok' | 'warning' | 'error'
      console.log(report.checks) // Array of check results