Skip to content

healthChecks

andy.rothwell edited this page Feb 28, 2020 · 8 revisions

healthChecks Configuration

Used to set up conditions for an app to show a customComp maintenance page or multiple maintenance pages.

param definition
type has to be either 'maintenanceHours' or 'maintenanceAPI'
condition depends on type, as described below

maintenanceHours

A maintenanceHours healthCheck can be used to set up weekly hours that a maintenance page will show.

The condition parameter takes an array, and each array item must be an object with the following parameters:

param definition
day a number 1-7 (1 = monday, 2 = tuesday, 3 = wednesday...)
startTime a time (in military time), which will be interpreted by the app to be in East Coast Timezone
endTime a time (in military time), which will be interpreted by the app to be in East Coast Timezone

maintenanceAPI

A maintenanceAPI healthCheck will use an axios call to check an API status, to determine whether to show a maintenance page.

The condition parameter takes a string, which should be the url to hit.

Example

healthChecks: [
  {
    type: 'maintenanceHours',
    condition: [
      {
        'day': 7,
        'startTime': '11:00',
        'endTime': '12:20',
      },
      {
        'day': 5,
        'startTime': '11:20',
        'endTime': '13:50',
      },
    ],
  },
  {
    type: 'maintenanceAPI',
    condition: 'https://real-estate-tax-monitors.s3.amazonaws.com/status_down.json',
  },
],
Clone this wiki locally