/hapijs-status-monitor

🚀 (just for fun!) Realtime Monitoring solution for Hapi.js apps, highly inspired from express-status-monitor :P

Primary LanguageHTMLMIT LicenseMIT

hapijs-status-monitor

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

Inspired from express-status-monitor

Installation & setup

  1. Run npm install hapijs-status-monitor --save

  2. Register plugin server.register({ register: require('hapijs-status-monitor')});

  3. Run server and go to /status

To send requests locally

 while sleep 1; do curl http://localhost:8000/hello; done

Options

Monitor can be configured by passing options object into server register method

server.register({ register: require('hapijs-status-monitor'), options:{}})

Default config:

path: '/status',
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
}]

License

MIT License © ziyasal