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
Install package
npm install hapijs-status-monitor --saveRegister plugin
server.register({
register: require('hapijs-status-monitor')
});Run server and go to /status
- Go to
cd examples/ - Run
npm i - Run server
npm start - Go to
http://localhost:8000/status
Monitor can be configured by passing options object into server register method
server.register({
register: require('hapijs-status-monitor'),
options: {
title: 'My Status Monitor',
routeConfig: {
auth: false
}
}
});Default options:
title: 'hapi.js Status',
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
}],
routeConfig: {} // Route options, see https://github.com/hapijs/hapi/blob/master/API.md#route-optionsThanks goes to these wonderful people (emoji key):
z i ฮป a s a l ๐ป |
Daniel Bayerlein ๐ป |
|---|
This project follows the all-contributors specification. Contributions of any kind welcome!
Copyright (c) 2016-present @ziyasal & @danielbayerlein. See LICENSE for details.
