Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nest-status-monitor

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nest-status-monitor

Realtime Monitoring for Express-based Node applications

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
305
increased by37.39%
Maintainers
1
Weekly downloads
 
Created
Source

nest-status-monitor

NPM

nest-status-monitor on npm npm Build Status Coverage Status License Edit nest-status-monitor

Simple, self-hosted module based on Socket.io and Chart.js to report realtime server metrics for Nest.js based node servers.

Status monitor page

Demo

Demo can be found here

Installation & setup Nest.js v6

  1. Run npm install nest-status-monitor --save
  2. Setup module:
@Module({
  imports: [StatusMonitorModule.setUp(statusMonitorConfig)],
  1. Run server and go to /status

Installation & setup Nest.js v5

  1. Run npm install nest-status-monitor@0.0.3 --save
  2. Setup module:
@Module({
  imports: [StatusMonitorModule.setUp(statusMonitorConfig)],
  1. 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:

pageTitle: 'Nest.js Monitoring Page',
port: 3001,
path: '/status',
ignoreStartsWith: '/healt/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.

// config
healthChecks: [
  {
    protocol: 'http',
    host: 'localhost',
    path: '/health/alive',
    port: 3001,
  },
  {
    protocol: 'http',
    host: 'localhost',
    path: '/health/dead',
    port: 3001,
  },
];

License

MIT License © Ivan Vasiljevic

Forked from express-status-monitor

Keywords

FAQs

Package last updated on 26 Apr 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc