Permalink
Browse files

Add settings for deleteIdleStats, deleteSets and deleteCounters

  • Loading branch information...
1 parent 034d843 commit 61a6acdb7416411a7b8b63a3050d78a880287485 @awestendorf awestendorf committed with Jun 19, 2013
Showing with 30 additions and 15 deletions.
  1. +6 −0 README.md
  2. +5 −2 attributes/default.rb
  3. +16 −13 recipes/default.rb
  4. +3 −0 templates/default/config.js.erb
View
@@ -30,10 +30,16 @@ Installs and configures StatsD.
* `node["statsd"]["port"]` - Port to run StatsD on.
* `node["statsd"]["graphite_host"]` - Graphite host.
* `node["statsd"]["graphite_port"]` - Graphite port.
+* `node["statsd"]["delete_idle_stats"]` - Don't send values to graphite for
+ inactive stats (default: `false`).
* `node["statsd"]["delete_timers"]` - Don't send values to graphite for
inactive timers (default: `false`).
* `node["statsd"]["delete_gauges"]` - Don't send values to graphite for
inactive gauges (default: `false`).
+* `node["statsd"]["delete_sets"]` - Don't send values to graphite for
+ inactive sets (default: `false`).
+* `node["statsd"]["delete_counters"]` - Don't send values to graphite for
+ inactive counters (default: `false`).
* `node["statsd"]["username"]` - Will be used for process supervision (default: `stasd` )
* `node["statsd"]["graphite"]["legacy_namespace"]` - Flag to use legacy
View
@@ -6,10 +6,13 @@
default["statsd"]["port"] = 8125
default["statsd"]["graphite_host"] = "127.0.0.1"
default["statsd"]["graphite_port"] = 2003
-default['statsd']['graphite_role'] = 'graphite_server'
-default['statsd']['graphite_query'] = "roles:#{node['statsd']['graphite_role']} AND chef_environment:#{node.chef_environment}"
+default["statsd"]["graphite_role"] = "graphite_server"
+default["statsd"]["graphite_query"] = "roles:#{node['statsd']['graphite_role']} AND chef_environment:#{node.chef_environment}"
+default["statsd"]["delete_idle_stats"] = false
default["statsd"]["delete_timers"] = false
default["statsd"]["delete_gauges"] = false
+default["statsd"]["delete_sets"] = false
+default["statsd"]["delete_counters"] = false
default["statsd"]["username"] = "statsd"
# Graphite storage config
View
@@ -26,19 +26,22 @@
mode "0644"
source "config.js.erb"
variables(
- :address => node["statsd"]["address"],
- :port => node["statsd"]["port"],
- :flush_interval => node["statsd"]["flush_interval"],
- :graphite_port => node["statsd"]["graphite_port"],
- :graphite_host => graphite_host,
- :delete_gauges => node["statsd"]["delete_gauges"],
- :delete_timers => node["statsd"]["delete_timers"],
- :legacy_namespace => node["statsd"]["graphite"]["legacy_namespace"],
- :global_prefix => node["statsd"]["graphite"]["global_prefix"],
- :prefix_counter => node["statsd"]["graphite"]["prefix_counter"],
- :prefix_timer => node["statsd"]["graphite"]["prefix_timer"],
- :prefix_gauge => node["statsd"]["graphite"]["prefix_gauge"],
- :prefix_set => node["statsd"]["graphite"]["prefix_set"]
+ :address => node["statsd"]["address"],
+ :port => node["statsd"]["port"],
+ :flush_interval => node["statsd"]["flush_interval"],
+ :graphite_port => node["statsd"]["graphite_port"],
+ :graphite_host => graphite_host,
+ :delete_idle_stats => node["statsd"]["delete_idle_stats"],
+ :delete_gauges => node["statsd"]["delete_gauges"],
+ :delete_timers => node["statsd"]["delete_timers"],
+ :delete_sets => node["statsd"]["delete_sets"],
+ :delete_counters => node["statsd"]["delete_counters"],
+ :legacy_namespace => node["statsd"]["graphite"]["legacy_namespace"],
+ :global_prefix => node["statsd"]["graphite"]["global_prefix"],
+ :prefix_counter => node["statsd"]["graphite"]["prefix_counter"],
+ :prefix_timer => node["statsd"]["graphite"]["prefix_timer"],
+ :prefix_gauge => node["statsd"]["graphite"]["prefix_gauge"],
+ :prefix_set => node["statsd"]["graphite"]["prefix_set"]
)
notifies :restart, "runit_service[statsd]"
end
@@ -4,8 +4,11 @@
"address": "<%= @address %>",
"port": <%= @port %>,
"flushInterval": <%= @flush_interval %>,
+ "deleteIdleStats": <%= @delete_idle_stats %>,
"deleteGauges": <%= @delete_gauges %>,
"deleteTimers": <%= @delete_timers %>,
+ "deleteSets": <%= @delete_sets %>,
+ "deleteCounters": <%= @delete_counters %>,
"graphite": {
"legacyNamespace": <%= @legacy_namespace %>,
"globalPrefix": "<%= @global_prefix %>",

0 comments on commit 61a6acd

Please sign in to comment.