http-watchdog

0.0.1-alpha.2 • Public • Published

http-watchdog

build status code coverage code style styled with prettier made with lass license npm downloads

A simple http watchdog to monitor app health

Overview

This watchdog is a side car container that sits next to your application process / container. The watchdog is configured via an environment file or direct environment variables injected into the container at startup. From there, the watchdog polls the health of your application and sends alerts after a variable number of failures.

Table of Contents

Install

npm:

npm install http-watchdog

yarn:

yarn add http-watchdog

Usage

const Watchdog = require('http-watchdog');
 
const watchdog = new Watchdog({
  healthcheck: 'http://localhost:3000/health'
});
 
watchdog.watch();

Options

  • delay - (number, default: 0 ms) - delay before checking health (in milliseconds)
  • failureCount - (number, default: 3 failures) - number of failures before sending an alert
  • interval - (number, default: 5000 ms) - interval at which to poll against health check
  • healthcheck - (string, default: undefined) - healthcheck URL to poll against (success: 200, failure: 4xx, 5xx)
  • logger - (function, default: null) - A configurable logger triggered on alert
  • timeout - (number, default: 1000 ms) - configurable healthcheck timeout

Contributors

Name Website
Shaun Warman https://shaunwarman.com

License

MIT © Shaun Warman

Readme

Keywords

Package Sidebar

Install

npm i http-watchdog

Weekly Downloads

0

Version

0.0.1-alpha.2

License

MIT

Unpacked Size

9.85 kB

Total Files

13

Last publish

Collaborators

  • shaunwarman