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-watchdog
yarn:
yarn add http-watchdog
Usage
const Watchdog = ; const watchdog = healthcheck: 'http://localhost:3000/health'; watchdog;
Options
delay
- (number
, default:0
ms) - delay before checking health (in milliseconds)failureCount
- (number
, default:3
failures) - number of failures before sending an alertinterval
- (number
, default:5000
ms) - 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:1000
ms) - configurable healthcheck timeout
Contributors
Name | Website |
---|---|
Shaun Warman | https://shaunwarman.com |