0.0.1 • Published 12 years ago

connect-cube v0.0.1

Weekly downloads
5
License
-
Repository
github
Last release
12 years ago

Connect-Cube

Request information forwarding to Cube using UDP or Websockets. Built out of frustration at trying to get Graphite running.

##Install

$ npm install connect-cube

##Use

var connectCube = require("connect-cube");

//Setup connect/express middleware with default options
app.use(connectCube());

//Setup connect/express middleware with custom options
app.use(connectCube({
	host: 'udp://127.0.0.1',
	port: 1234
}));	

Note: You must prefix the host option with udp:// or ws://.

Default options:

  • Host: udp://localhost
  • Port: 1180
  • Prefix: ""

If you choose to use WebScocket, you will also need to change the port, whic defaults to the UDP port. The standard Cube collector WebSocket port is 1080.

Using UDP is fire and forget, whilst using WebSockets may throw errors if the target Cube collector is not running or not accessible.

License

This work is licensed under a Creative Commons Attribution 3.0 Unported License.