diff --git a/exampleProxyConfig.js b/exampleProxyConfig.js index ef7f26b1..040fb32a 100644 --- a/exampleProxyConfig.js +++ b/exampleProxyConfig.js @@ -3,6 +3,8 @@ Required Variables: port: StatsD Cluster Proxy listening port [default: 8125] + mgmt_port: StatsD Cluster Proxy telnet management port [default: 8126] + mgmt_address: address to run the management TCP interface on [default: 0.0.0.0] nodes: list of StatsD instances host: address of an instance of StatsD port: port that this instance is listening on @@ -30,9 +32,9 @@ nodes: [ {host: '127.0.0.1', port: 8131, adminport: 8132} ], server: './servers/udp', - host: '0.0.0.0', port: 8125, +mgmt_port: 8126, forkCount: 0, checkInterval: 1000, cacheSize: 10000 diff --git a/proxy.js b/proxy.js index 54c0f196..6499cade 100644 --- a/proxy.js +++ b/proxy.js @@ -21,8 +21,8 @@ var l; // logger configlib.configFile(process.argv[2], function (conf, oldConfig) { config = conf; - var udp_version = config.udp_version - , nodes = config.nodes; + var udp_version = config.address_ipv6 ? 'udp6' : 'udp4'; + var nodes = config.nodes; l = new logger.Logger(config.log || {}); var forkCount = config.forkCount; @@ -134,7 +134,6 @@ configlib.configFile(process.argv[2], function (conf, oldConfig) { } } }); - var client = dgram.createSocket(udp_version); // Listen for the send message, and process the metric key and msg packet.on('send', function(key, msg) { @@ -152,9 +151,6 @@ configlib.configFile(process.argv[2], function (conf, oldConfig) { } }); - // Bind the listening udp server to the configured port and host - server.bind(config.port, config.host || undefined); - mgmt_server.start( config, function(cmd, parameters, stream) {