@firstandthird/hapi-healthcheck

1.0.0 • Public • Published

hapi-healthcheck

server monitoring

Options:

  • token - Optional token to secure the endpoint.
  • endpoint - Route to use. Defaults to /health
  • checks - array objects for each check.
    • name - Name of the check, used as the key in the response json.
    • method - server method to call. Will be called as async method(request, options). Function should return json.
    • options - optional data to pass to the method.

Example output:

{
  "host": "sorrynotsorry.local",
  "env": "test",
  "uptime": 0,
  "cpu": { "user": 384085, "system": 48978 },
  "memory": {
    "rss": 47497216,
    "heapTotal": 32874496,
    "heapUsed": 18066608,
    "external": 518509
  },
  "customCheck": { "test": 1 }
}

/@firstandthird/hapi-healthcheck/

    Package Sidebar

    Install

    npm i @firstandthird/hapi-healthcheck

    Weekly Downloads

    2

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • jga
    • dawnerd
    • ecwillis
    • orthagonal1
    • alaguna
    • aleperez92