# node-monitor-test

> node system monitoring with websocket.

Latest version **1.0.0** (published 2017-09-05) · ISC license · 0 weekly downloads

## Install

```sh
npm install node-monitor-test
pnpm add node-monitor-test
yarn add node-monitor-test
bun add node-monitor-test
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2017-09-05 |
| First published | 2017-09-05 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Known vulnerabilities | 0 (+16 in 3 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Suchan Kim |
| Maintainers | hakoiko |

## Links

- npm: https://www.npmjs.com/package/node-monitor-test
- Repository: https://github.com/hakoiko/ws-monitor-agent
- Homepage: https://github.com/hakoiko/ws-monitor-agent#readme
- Issues: https://github.com/hakoiko/ws-monitor-agent/issues
- npm.io page: https://npm.io/package/node-monitor-test

## Dependencies (5)

- [ws](https://npm.io/package/ws.md) ^2.2.3
- [pm2](https://npm.io/package/pm2.md) ^2.4.5
- [cpu-stat](https://npm.io/package/cpu-stat.md) ^2.0.1
- [socket.io-client](https://npm.io/package/socket.io-client.md) ^2.0.1
- [systeminformation](https://npm.io/package/systeminformation.md) ^3.17.0

## Recent versions

- 1.0.0 (latest) — 2017-09-05

## README

# Node.js System Monitor Agent
set url for server at src/config.js. and run with
```
npm run start
```
the app runs with PM2. or you can run this monitoring agent just type `pm2 start dist/node.bundle.js --watch` if you installed PM2.

# Requirements
- node.js > 5.x
- node-gyp
- gcc

the app needs node.js latest then 5.x. and also need node-gyp and gcc. if your system dosen't have gcc, please install it. if you use a vainilla centOS, you must do it. 
```
sudo yum install gcc-c++
```

# Usage
## Starting app
```
npm install
npm run start
```

## Serverside setup

Just simple as normal socket.io settings. I recommend to use socket.io and express
```
const express = require('express')
const app = express()
const server = require('http').Server(app)
const io =  require('socket.io')(server)
var agent = io.of('/ws/agent')
agent.on('connect', function(socket) {
	console.log('AGENT CONNECTED')
	socket.on('usage', function (data) {
		console.log('USAGE RECEIVED : ', data)
	});
});
```

# License

MIT License.

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