diff --git a/backends/graphite.js b/backends/graphite.js index 40677df..973b66b 100644 --- a/backends/graphite.js +++ b/backends/graphite.js @@ -117,10 +117,11 @@ var flush_stats = function graphite_flush(ts, metrics) { var namespace = timerNamespace.concat(key); var the_key = namespace.join("."); - if (typeof(timer_data_key) === 'string') { + if (typeof(timer_data[key][timer_data_key]) === 'number') { statString += the_key + '.' + timer_data_key + ' ' + timer_data[key][timer_data_key] + ts_suffix; } else { for (timer_data_sub_key in timer_data[key][timer_data_key]) { + l.log(timer_data[key][timer_data_key][timer_data_sub_key].toString()); statString += the_key + '.' + timer_data_key + '.' + timer_data_sub_key + ' ' + timer_data[key][timer_data_key][timer_data_sub_key] + ts_suffix; } diff --git a/stats.js b/stats.js index 1f72756..e18a08e 100644 --- a/stats.js +++ b/stats.js @@ -54,7 +54,7 @@ function flushMetrics() { counter_rates: counter_rates, timer_data: timer_data, pctThreshold: pctThreshold, - histogram: config.histogram + histogram: conf.histogram } // After all listeners, reset the stats @@ -124,7 +124,7 @@ config.configFile(process.argv[2], function (config, oldConfig) { bad_lines_seen = prefixStats + ".bad_lines_seen"; packets_received = prefixStats + ".packets_received"; - //now set to zero so we can increment them + //now set to zero so we can increment them counters[bad_lines_seen] = 0; counters[packets_received] = 0;