Skip to content

Commit

Permalink
updated docs and version
Browse files Browse the repository at this point in the history
  • Loading branch information
f-w committed May 2, 2024
1 parent 6584cc6 commit 54f7664
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ export default defineUserConfig({
{
text: 'Miscellaneous',
children: [
'/docs/health-check/',
'/docs/benchmarks/',
'/docs/bulk-import/',
'/docs/developer-notes/',
Expand Down
5 changes: 5 additions & 0 deletions docs/docs/getting-started/what's-new.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ next: /docs/config-overview/

_NotifyBC_ uses [semantic versioning](https://semver.org/).

## v5.1.0

- Issue [#85](https://github.com/bcgov/NotifyBC/issues/85): Added health check
- Changed package manager from yarn to npm

## v5.0.0

See [Upgrade Guide](../upgrade/#v4-to-v5) for more information.
Expand Down
48 changes: 48 additions & 0 deletions docs/docs/miscellaneous/health-check.md
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.
2 changes: 1 addition & 1 deletion helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ version: 1.1.1
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: '5.0'
appVersion: '5.1'

dependencies:
- name: mongodb
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "notify-bc",
"version": "5.0.14",
"version": "5.1.0",
"dbSchemaVersion": "0.9.0",
"description": "A versatile notification API server",
"author": "f-w",
Expand Down

0 comments on commit 54f7664

Please sign in to comment.