0.0.1-alpha.2 • Published 7 years ago
http-watchdog v0.0.1-alpha.2
http-watchdog
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-watchdogyarn:
yarn add http-watchdogUsage
const Watchdog = require('http-watchdog');
const watchdog = new Watchdog({
healthcheck: 'http://localhost:3000/health'
});
watchdog.watch();Options
delay- (number, default:0ms) - delay before checking health (in milliseconds)failureCount- (number, default:3failures) - number of failures before sending an alertinterval- (number, default:5000ms) - interval at which to poll against health checkhealthcheck- (string, default:undefined) - healthcheck URL to poll against (success: 200, failure:4xx,5xx)logger- (function, default:null) - A configurable logger triggered on alerttimeout- (number, default:1000ms) - configurable healthcheck timeout
Contributors
| Name | Website |
|---|---|
| Shaun Warman | https://shaunwarman.com |