Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bugthesystem/hapijs-status-monitor
🚀 Realtime Monitoring solution for Hapi.js apps
https://github.com/bugthesystem/hapijs-status-monitor
hapi-plugin hapijs hapijs-status-monitor monitoring nodejs
Last synced: 8 days ago
JSON representation
🚀 Realtime Monitoring solution for Hapi.js apps
- Host: GitHub
- URL: https://github.com/bugthesystem/hapijs-status-monitor
- Owner: bugthesystem
- License: mit
- Created: 2016-08-19T19:04:12.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-07-11T22:15:02.000Z (over 1 year ago)
- Last Synced: 2024-10-12T01:24:51.219Z (23 days ago)
- Topics: hapi-plugin, hapijs, hapijs-status-monitor, monitoring, nodejs
- Language: JavaScript
- Homepage:
- Size: 1010 KB
- Stars: 137
- Watchers: 4
- Forks: 28
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# hapijs-status-monitor
[![Build Status](https://travis-ci.org/ziyasal/hapijs-status-monitor.svg?branch=master)](https://travis-ci.org/ziyasal/hapijs-status-monitor) [![npm](https://img.shields.io/npm/v/hapijs-status-monitor.svg)](https://www.npmjs.com/package/hapijs-status-monitor) [![Coverage Status](https://coveralls.io/repos/github/ziyasal/hapijs-status-monitor/badge.svg?branch=master)](https://coveralls.io/github/ziyasal/hapijs-status-monitor?branch=master)
Simple, self-hosted module based on [Socket.IO](http://socket.io) and
[Chart.js](http://www.chartjs.org) to report realtime server metrics for
[hapi.js](http://hapijs.com) servers.**Inspired from [express-status-monitor](https://github.com/RafalWilinski/express-status-monitor)**
![screenshot](./docs/images/screenshot.jpg)
## Installation & setup
**Install package**
```sh
npm install hapijs-status-monitor --save
```**Register plugin**
```js
await server.register({ plugin: require('hapijs-status-monitor') });
```
**Run server and go to** `/status`## Run examples
1. Go to `cd examples/`
2. Run `npm i`
3. Run server `npm start`
4. Go to `http://localhost:8000/status`## Options
Monitor can be configured by passing options object into server register method
```js
await server.register({
plugin: require('hapijs-status-monitor'),
options: {
title: 'My Status Monitor',
routeConfig: {
auth: false
}
}
});
```Default options:
```js
title: 'hapi.js Status',
path: '/status', // Path to Status Page
base: '/', // href attribute of the base html tag
websocket: null, // The Socket.io instance to be used, if none provided a new one will be created!
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-options
```## Contributors
Thanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)):
| [
z i λ a s a l](http://www.ziyasal.com)
[💻](https://github.com/ziyasal/hapijs-status-monitor/commits?author=ziyasal "Code") [⚠️](https://github.com/ziyasal/hapijs-status-monitor/commits?author=ziyasal "Tests") [📖](https://github.com/ziyasal/hapijs-status-monitor/commits?author=ziyasal "Documentation") | [
Daniel Bayerlein](https://github.com/danielbayerlein)
[💻](https://github.com/ziyasal/hapijs-status-monitor/commits?author=danielbayerlein "Code") [⚠️](https://github.com/ziyasal/hapijs-status-monitor/commits?author=danielbayerlein "Tests") [📖](https://github.com/ziyasal/hapijs-status-monitor/commits?author=danielbayerlein "Documentation") |
| :---: | :---: |This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome!
## License
Copyright (c) 2016-present [@ziyasal](https://github.com/ziyasal) & [@danielbayerlein](https://github.com/danielbayerlein).
See [LICENSE](./LICENSE.md) for details.