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
- MongoDB - MongoDB must be reachable
- config - There must be at least 2 items in MongoDB configuration collection
- Redis - Redis must be reachable if configured
/health
API end point is also reachable in API Explorer of NotifyBC web console.