Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes Issues #188 - repeater can be configured for udp6, defaults to udp4 #190

Merged
merged 1 commit into from Nov 3, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion backends/repeater.js
Expand Up @@ -4,7 +4,9 @@ var util = require('util'),
function RepeaterBackend(startupTime, config, emitter){
var self = this;
this.config = config.repeater || [];
this.sock = dgram.createSocket('udp4');
this.sock = (config.repeaterProtocol == 'udp6') ?
dgram.createSocket('udp6') :
dgram.createSocket('udp4');

// attach
emitter.on('packet', function(packet, rinfo) { self.process(packet, rinfo); });
Expand Down
4 changes: 4 additions & 0 deletions exampleConfig.js
Expand Up @@ -49,11 +49,15 @@ Optional Variables:
packets should be "repeated" (duplicated to).
e.g. [ { host: '10.10.10.10', port: 8125 },
{ host: 'observer', port: 88125 } ]

repeaterProtocol: whether to use udp4 or udp4 for repeaters.
["udp4" or "udp6", default: "udp4"]
*/
{
graphitePort: 2003
, graphiteHost: "graphite.host.com"
, port: 8125
, backends: [ "./backends/graphite" ]
, repeater: [ { host: "10.8.3.214", port: 8125 } ]
, repeaterProtocol: "udp4"
}