Health Check

Health status of NotifyBC can be obtained by querying /health API end point. For example

$ curl -s http://localhost:3000/api/health | jq
{
  "status": "ok",
  "info": {
    "MongoDB": {
      "status": "up"
    },
    "config": {
      "status": "up",
      "count": 2
    },
    "redis": {
      "status": "up"
    }
  },
  "error": {},
  "details": {
    "MongoDB": {
      "status": "up"
    },
    "config": {
      "status": "up",
      "count": 2
    },
    "redis": {
      "status": "up"
    }
  }
}

If overall health status is OK, the HTTP response code is 200, otherwise 503. The response payload shows status of following indicators and health criteria

  1. MongoDB - MongoDB must be reachable
  2. config - There must be at least 2 items in MongoDB configuration collection
  3. Redis - Redis must be reachable if configured

/health API end point is also reachable in API Explorer of NotifyBC web console.