Healthcheck Properties
  • 17 Nov 2022
  • Dark
    Light
  • PDF

Healthcheck Properties

  • Dark
    Light
  • PDF

Article Summary

Definition

All healthcheck properties are contained within the healthcheck object in the IAP Service Instance Configuration for the adapter. There is a “healthcheck” action defined in the .system entity that is used to define the healthcheck request. The path to the healthcheck file is adapter/xyz/entities/.system/action.json.

Note: Often, the healthcheck endpoint is set to /healthcheck by default because the best healthcheck API call has yet to be determined. If you want healthchecks to work, you must determine a good enpoint and set it accordingly.

Property Type Required Description
type enum Yes The type of healthcheck to use.

none: Does not run any healthchecks. In this situation the adapter will always show the status as green.

startup: Run a healthcheck at start up only. If the healthcheck works, then the status will show as green. If the healthcheck fails, the status will show as red. The status will not be updated.

intermittent – Run healthchecks at a defined interval. The status is as of the last time healthcheck ran. It will be updated based on the results of the healthcheck API each time the call is made.
frequency integer Yes (if intermittent) The frequency in which to run intermittent healthchecks. Measured in milliseconds (ms).
query_object object No An object containing query variables to add onto the healthcheck call.

Example Scenario

  • In this example, a healthcheck is set to run every 5 minutes (300s – 300000ms).
  • The call for the healthcheck is a GET method: https://mysystem.abc.com:3443/api/rest/v2.3/getSystemStatus The host, port, base_path, and version are defined in the IAP Service Instance Configuration for the adapter. The path defined here is just /getSystemStatus.
  • The data in the response is not the primary focus here, but rather that we got a response. For this example, we can use the default schema with no translation.
  • We want to add a query to the call of mytest=hello

IAP Service Instance Configuration Properties for the Adapter

"healthcheck": {
  "type": "intermittent",
  "frequency": 300000,
  "query_object": {
    "mytest": "hello"
  }
},

Endpoint Configuration for the Adapter (entities/.system/action.json)

{
  "name": "healthcheck",
  "protocol": "REST",
  "method": "GET",
  "entitypath": "{base_path}/{version}/getSystemStatus?{query}",
  "requestSchema": "schema.json",
  "responseSchema": "schema.json",
  "timeout": 0,
  "sendEmpty": false,
  "requestDatatype": "JSON",
  "responseDatatype": "JSON",
  "headers": {},
  "responseObjects": [
    {
      "type": "default",
      "key": "",
      "mockFile": "mockdatafiles/healthcheck-default.json"
    }
  ]
}

Was this article helpful?

What's Next
Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.