As a devops I want a standardized application health check url

Description

Create a health endpoint that can provide the status of the application. Suggest we follow this draft ietf draft recommendation

https://tools.ietf.org/id/draft-inadarei-api-health-check-03.html

Suggested format:

THIS HAS BEEN EDITED TO MATCH THE IMPLEMENTED SOLUTION

/info/health

status

notes

HTTP code

meaning

pass

n/a

200

All is OK

warn

service(s) in WARN state

200

Partially working service here

warn

services(s) in ERROR state

200

Look for service on another node

fail

maintenance

503

Node not available, try again later

fail

disabled

503

Node not available, try another node

fail

offline

503

Node not running, try another node

columns refer to JSON response. Examples JSON repsonses:

HTTP Status: 200

1 2 3 4 5 6 7 8 { "status": "pass", "version": "1", "releaseId": "8.0", "notes": [""], "serviceId": "f03e522f-1f44-4062-9b55-9587f91c9c41", "description": "Health of Opencast node" }

HTTP Status: 200

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 { "status": "warn", "version": "1", "releaseId": "8.0", "notes": ["service(s) in WARN state", "service(s) in ERROR state"], "serviceId": "f03e522f-1f44-4062-9b55-9587f91c9c41", "description": "Health of Opencast node" "checks" : { "service:states": [ { "componentId": "org.opencastproject.ingest", " state": "ERROR", "changed": "2019-01-01 10:45:22", },{ "componentId": "org.opencastproject.composer", " state": "WARN", "changed": "2019-01-01 10:45:22"} ] } }

HTTP Status: 503

1 2 3 4 5 6 7 8 { "status": "fail", "version": "1", "releaseId": "8.0", "notes": ["node is disabled"], "serviceId": "f03e522f-1f44-4062-9b55-9587f91c9c41", "description": "Health of Opencast node" }

You can choose what range your ingest load balancer excepts as OK, eg 200 to 206

Steps to reproduce

None

Status

Assignee

James Perrin

Reporter

James Perrin

Criticality

None

Tags (folksonomy)

Components

Fix versions

Priority

Configure