Uploaded image for project: 'Opencast'
  1. MH-13515

As a devops I want a standardized application health check url

    Details

    • Type: Story Card
    • Status: In Progress
    • Resolution: Unresolved
    • Affects versions: None
    • Fix versions: 8.0
    • Components: Backend Software
    • Labels:
      None

      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-02.html

      Suggested format:

      /info/health

      status notes HTTP code meaning
      pass n/a 200 All is OK
      warn service in WARN state 206 Partially working service here
      warn service in ERROR state 303 Look for service on another node
      warn maintenance 307 Node not available, try again later
      fail disabled 409 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

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

      HTTP Status: 302

      {
        "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: 409

      {
        "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

        TestRail: Results

          Attachments

            Issue links

              Activity

                People

                • Assignee:
                  james.perrin James Perrin
                  Reporter:
                  james.perrin James Perrin
                • Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:

                    TestRail: Cases