# node-health

> Node JS process health monitor

Latest version **1.0.2** (published 2017-01-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install node-health
pnpm add node-health
yarn add node-health
bun add node-health
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2017-01-09 |
| First published | 2017-01-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Ivan Zakharchanka |
| Maintainers | 3axap4ehko |

## Links

- npm: https://www.npmjs.com/package/node-health
- Repository: https://github.com/3axap4eHko/node-health
- Homepage: https://github.com/3axap4eHko/node-health#readme
- Issues: https://github.com/3axap4eHko/node-health/issues
- npm.io page: https://npm.io/package/node-health

## Recent versions

- 1.0.2 (latest) — 2017-01-09
- 1.0.1 — 2017-01-06
- 1.0.0 — 2017-01-06

## README

# NODE HEALTH

Node JS process health monitor

## Usage
``` javascript
// master.js
'use strict';

import {fork} from 'child_process';
import {cpus} from 'os';
import monitor from 'node-health/monitor';

const processes = cpus().map(() => fork('./fork'));
monitor(processes);
```

``` javascript
// service.js

'use strict';

import 'node-health/child';

setInterval(function () {
  let i = 100000;
  while(i--);
}, 2000);

```
and open url
[http://localhost:5113/health](http://localhost:5113/health)

## environment variables

 - HEALTH_PORT - port for monitor
 - HEALTH_HOST - host for monitor
 - HEALTH_ENDPOINT - endpoint for monitor
 - HEALTH_LOG - monitor log file
 - HEALTH_TICK - monitor tick measurement
 - HEALTH_SIZE - maximum display size of metrics

## License

The MIT License Copyright (c) 2017-present Ivan Zakharchenko

---
_Source: https://npm.io/package/node-health · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
