Simple, self-hosted module based on Socket.io and Chart.js to report realtime server metrics for koa.js-based node servers.
npm install koa-monitor --save
const monitor = require('koa-monitor')
// then after
app.use(monitor(server, { path: '/status' }))
/status
Monitor can be configured by passing options(second argument) object into monitor
constructor.
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
}]
For an example koa server, check out `sample/server.js'
MIT License © Jiří Špác
Forked from express-status-monitor