Healthcheck properties

All healthcheck properties are defined within the healthcheck object in theItential Platform service instance configuration for the adapter. The healthcheck request itself is defined by a healthcheck action in the .system entity at adapter/xyz/entities/.system/action.json.

The healthcheck endpoint defaults to /healthcheck in many adapters, but this may not be the best endpoint for your system. Determine an appropriate endpoint and configure it before relying on healthchecks.

Properties

PropertyTypeRequiredDescription
typeenumYesThe healthcheck strategy to use. none: No healthchecks run; the adapter always reports a green status. startup: A healthcheck runs once at startup. Status reflects that result and is not updated again. intermittent: Healthchecks run at a defined interval; status reflects the result of the most recent check.
frequencyintegerYes (if intermittent)How often to run healthchecks, in milliseconds.
query_objectobjectNoQuery parameters to append to the healthcheck request.

Example

This example runs a healthcheck every five minutes against GET /api/rest/v2.3/getSystemStatus with a mytest=hello query parameter.

Service instance configuration

1"healthcheck": {
2 "type": "intermittent",
3 "frequency": 300000,
4 "query_object": {
5 "mytest": "hello"
6 }
7}

Endpoint configuration (entities/.system/action.json)

1{
2 "name": "healthcheck",
3 "protocol": "REST",
4 "method": "GET",
5 "entitypath": "{base_path}/{version}/getSystemStatus?{query}",
6 "requestSchema": "schema.json",
7 "responseSchema": "schema.json",
8 "timeout": 0,
9 "sendEmpty": false,
10 "requestDatatype": "JSON",
11 "responseDatatype": "JSON",
12 "headers": {},
13 "responseObjects": [
14 {
15 "type": "default",
16 "key": "",
17 "mockFile": "mockdatafiles/healthcheck-default.json"
18 }
19 ]
20}