-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
79 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,6 @@ on: | |
push: | ||
branches: | ||
- main | ||
- healthCheck | ||
release: | ||
types: | ||
- published | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
--- | ||
permalink: /docs/health-check/ | ||
--- | ||
|
||
# Health Check | ||
|
||
Health status of _NotifyBC_ can be obtained by querying `/health` API end point. For example | ||
|
||
```json | ||
$ 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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters