Skip to content
Browse files

Merge branch 'master' into extracted-metrics-processing

  • Loading branch information...
2 parents 292c454 + 5a4609f commit bd03104a3ddfc9f742fdbac0e67e8e846d4fa171 @mrtazz mrtazz committed Nov 11, 2012
Showing with 24 additions and 12 deletions.
  1. +8 −6 README.md
  2. +3 −1 backends/repeater.js
  3. +4 −0 exampleConfig.js
  4. +2 −2 lib/config.js
  5. +7 −3 package.json
View
14 README.md
@@ -44,17 +44,19 @@ Timing
glork:320|ms
-The glork took 320ms to complete this time. StatsD figures out 90th percentile,
-average (mean), lower and upper bounds for the flush interval. The percentile
-threshold can be tweaked with `config.percentThreshold`.
+The glork took 320ms to complete this time. StatsD figures out percentiles,
+average (mean), standard deviation, sum, lower and upper bounds for the flush interval.
+The percentile threshold can be tweaked with `config.percentThreshold`.
The percentile threshold can be a single value, or a list of values, and will
generate the following list of stats for each threshold:
- stats.timers.$KEY.mean_$PCT stats.timers.$KEY.upper_$PCT
+ stats.timers.$KEY.mean_$PCT
+ stats.timers.$KEY.upper_$PCT
+ stats.timers.$KEY.sum_$PCT
-Where `$KEY` is the key you stats key you specify when sending to statsd, and
-`$PCT` is the percentile threshold.
+Where `$KEY` is the stats key you specify when sending to statsd, and `$PCT` is
+the percentile threshold.
Gauges
------
View
4 backends/repeater.js
@@ -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); });
View
4 exampleConfig.js
@@ -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"
}
View
4 lib/config.js
@@ -21,8 +21,8 @@ var Configurator = function (file) {
this.updateConfig();
- fs.watch(file, function (curr, prev) {
- if (curr.ino != prev.ino) { self.updateConfig(); }
+ fs.watch(file, function (event, filename) {
+ if (event == 'change') { self.updateConfig(); }
});
};
View
10 package.json
@@ -3,7 +3,10 @@
"description": "A simple, lightweight network daemon to collect metrics over UDP",
"author": "Etsy",
"scripts": {
- "test": "./run_tests.sh"
+ "test": "./run_tests.sh",
+ "start": "node stats.js config.js",
+ "install-windows-service": "node_modules\\.bin\\winser -i",
+ "uninstall-windows-service": "node_modules\\.bin\\winser -r"
},
"repository": {
"type": "git",
@@ -19,9 +22,10 @@
"temp": "0.4.x"
},
"optionalDependencies": {
- "node-syslog":"1.1.3"
+ "node-syslog":"1.1.3",
+ "winser": "=0.0.11"
},
- "engine": {
+ "engines": {
"node" : ">=0.4"
},
"bin": { "statsd": "./bin/statsd" }

0 comments on commit bd03104

Please sign in to comment.
Something went wrong with that request. Please try again.