Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/3axap4ehko/node-health
https://github.com/3axap4ehko/node-health
Last synced: 18 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/3axap4ehko/node-health
- Owner: 3axap4eHko
- Created: 2017-01-05T14:45:52.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-01-09T19:17:33.000Z (almost 8 years ago)
- Last Synced: 2024-10-19T11:17:16.968Z (27 days ago)
- Language: JavaScript
- Size: 34.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
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