Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/genfirst/nest-status-monitor
Simple, self-hosted module based on Socket.io and Chart.js to report realtime server metrics for Nest-based node servers
https://github.com/genfirst/nest-status-monitor
monitoring monitoring-page nest nest-module nest-status-monitor nodejs socket
Last synced: 6 days ago
JSON representation
Simple, self-hosted module based on Socket.io and Chart.js to report realtime server metrics for Nest-based node servers
- Host: GitHub
- URL: https://github.com/genfirst/nest-status-monitor
- Owner: GenFirst
- License: mit
- Created: 2018-10-08T23:58:05.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-23T21:57:21.000Z (about 2 years ago)
- Last Synced: 2025-02-15T23:11:22.253Z (6 days ago)
- Topics: monitoring, monitoring-page, nest, nest-module, nest-status-monitor, nodejs, socket
- Language: TypeScript
- Size: 1.68 MB
- Stars: 280
- Watchers: 4
- Forks: 35
- Open Issues: 42
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# nest-status-monitor
[](https://nodei.co/npm/nest-status-monitor/)
[](https://www.npmjs.com/package/nest-status-monitor)
[](https://img.shields.io/npm/dt/nest-status-monitor.svg)
[](https://travis-ci.org/GenFirst/nest-status-monitor)
[](https://coveralls.io/github/GenFirst/nest-status-monitor?branch=master)

[](https://codesandbox.io/s/yw1lov19q9?autoresize=1&initialpath=%2Fstatus)Simple, self-hosted module based on Socket.io and Chart.js to report realtime
server metrics for Nest.js based node servers.
## Demo
Demo can be found [here](https://nest-status-monitor.herokuapp.com/status)
## Installation & setup Nest.js v6
1. Run `npm install nest-status-monitor --save`
2. Setup module:```javascript
@Module({
imports: [StatusMonitorModule.setUp(statusMonitorConfig)],
```3. Run server and go to `/status`
## Installation & setup Nest.js v5
1. Run `npm install [email protected] --save`
2. Setup module:```javascript
@Module({
imports: [StatusMonitorModule.setUp(statusMonitorConfig)],
```3. Run server and go to `/status`
## Run examples
1. Go to `cd examples/test-status-monitor`
2. Run `npm i`
3. Run server `npm start`
4. Go to `http://localhost:3001`## Options
Monitor can be configured by passing options object during initialization of
module.Default config:
```javascript
pageTitle: 'Nest.js Monitoring Page',
port: 3001,
path: '/status',
ignoreStartsWith: '/health/alive',
spans: [
{
interval: 1, // Every second
retention: 60, // Keep 60 datapoints in memory
},
{
interval: 5, // Every 5 seconds
retention: 60,
},
{
interval: 15, // Every 15 seconds
retention: 60,
}
],
chartVisibility: {
cpu: true,
mem: true,
load: true,
responseTime: true,
rps: true,
statusCodes: true,
},
healthChecks: []
```## Health Checks
You can add a series of health checks to the configuration that will appear
below the other stats. The health check will be considered successful if the
endpoint returns a 200 status code.```javascript
// config
healthChecks: [
{
protocol: 'http',
host: 'localhost',
path: '/health/alive',
port: 3001,
},
{
protocol: 'http',
host: 'localhost',
path: '/health/dead',
port: 3001,
},
];
```## License
[MIT License](https://opensource.org/licenses/MIT) © Ivan Vasiljevic
Forked from
[express-status-monitor](https://github.com/RafalWilinski/express-status-monitor)