Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vigneshshanmugam/monitor-sockets
Monitor & debug socket connections in Node.js seamlessly.
https://github.com/vigneshshanmugam/monitor-sockets
agent connections debug monitor nodejs sockets
Last synced: 3 months ago
JSON representation
Monitor & debug socket connections in Node.js seamlessly.
- Host: GitHub
- URL: https://github.com/vigneshshanmugam/monitor-sockets
- Owner: vigneshshanmugam
- License: mit
- Created: 2018-10-08T12:58:59.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2018-10-08T16:35:22.000Z (about 6 years ago)
- Last Synced: 2024-08-10T19:25:18.373Z (5 months ago)
- Topics: agent, connections, debug, monitor, nodejs, sockets
- Language: JavaScript
- Homepage:
- Size: 7.81 KB
- Stars: 5
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# monitor-sockets
Monitor socket connections in Node.js
### Installation
```js
yarn add monitor-sockets
```### Use
```js
// In your application index.js file before starting the server
const monitor = require("monitor-sockets");monitor.start({ interval: 2000 });
// Renders the table on the terminal
┌────────────────┬─────────┬────────┬──────────┬─────────┬───────────┬───────┐
│ Socket Name │ Created │ In Use │ Requests │ Timeout │ Destroyed │ Error │
├────────────────┼─────────┼────────┼──────────┼─────────┼───────────┼───────┤
│ localhost:8082 │ 20 │ 18 │ 200 │ 0 │ 0 │ 2 │
├────────────────┼─────────┼────────┼──────────┼─────────┼───────────┼───────┤
│ localhost:8085 │ 20 │ 20 │ 500 │ 0 │ 0 │ 0 │
├────────────────┼─────────┼────────┼──────────┼─────────┼───────────┼───────┤
│ localhost:8086 │ 20 │ 0 │ 0 │ 0 │ 0 │ 20 │
└────────────────┴─────────┴────────┴──────────┴─────────┴───────────┴───────┘
```### API
### start(options)
Starts monitoring the socket connections for both HTTP and HTTPS.
- `options` {Object}
- `interval` - Refresh interval to update the data on the Terminal
## LICENSE
MIT