# copromatic-koa-monitor

> Realtime monitoring for koa-based Node applications

Latest version **0.3.0** (published 2020-10-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install copromatic-koa-monitor
pnpm add copromatic-koa-monitor
yarn add copromatic-koa-monitor
bun add copromatic-koa-monitor
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.0 |
| Published | 2020-10-16 |
| First published | 2020-10-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=4 |
| Dependencies | 4 |
| Unpacked size | 16.6 KB |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| Author | Copromatic |
| Maintainers | gaetan-hautecoeur |
| Keywords | node, status, monitoring, koa, charts |

## Links

- npm: https://www.npmjs.com/package/copromatic-koa-monitor
- Repository: https://github.com/copromatic/koa-monitor
- Homepage: https://github.com/copromatic/koa-monitor#readme
- Issues: https://github.com/copromatic/koa-monitor/issues
- npm.io page: https://npm.io/package/copromatic-koa-monitor

## Dependencies (4)

- [mz](https://npm.io/package/mz.md) ^2.4.0
- [pidusage](https://npm.io/package/pidusage.md) ^1.0.5
- [socket.io](https://npm.io/package/socket.io.md) ^1.5.0
- [handlebars](https://npm.io/package/handlebars.md) ^4.0.5

## Alternatives

- [d3-force-3d](https://npm.io/package/d3-force-3d.md) — 1.0M weekly downloads
- [ng2-charts](https://npm.io/package/ng2-charts.md) — 486.8K weekly downloads
- [@arcgis/core](https://npm.io/package/@arcgis/core.md) — 257.8K weekly downloads
- [react-sparklines](https://npm.io/package/react-sparklines.md) — 249.3K weekly downloads
- [react-native-gifted-charts](https://npm.io/package/react-native-gifted-charts.md) — 182.3K weekly downloads

## Recent versions

- 0.3.0 (latest) — 2020-10-16

## README

# koa-monitor  ![npm badge](https://nodei.co/npm/koa-monitor.png)

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

![Monitoring Page](http://i.imgur.com/AHizEWq.gif "Monitoring Page")

## Installation & setup 
1. Run `npm install koa-monitor --save`
2. Before any other middleware add following line:
```javascript
const monitor = require('koa-monitor')
// then after
app.use(monitor(server, {path: '/status'}))
```
3. Run server and go to `/status`

## Options

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'

## License

[MIT License](https://opensource.org/licenses/MIT) © Copromatic

Forked from [carlisliu/koa-monitor](https://github.com/carlisliu/koa-monitor)
which is forked from [express-status-monitor](https://github.com/RafalWilinski/express-status-monitor)

---
_Source: https://npm.io/package/copromatic-koa-monitor · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
