Set default values for delete_ configuration options

closes #1893
This commit is contained in:
Cameron Sparr 2016-12-13 16:34:52 +00:00
parent 74d8aef0c0
commit cebbf39276
3 changed files with 34 additions and 14 deletions

View File

@ -2,6 +2,10 @@
### Release Notes ### Release Notes
- The StatsD plugin will now default all "delete_" config options to "true". This
will change te default behavior for users who were not specifying these parameters
in their config file.
### Features ### Features
- [#2123](https://github.com/influxdata/telegraf/pull/2123): Fix improper calculation of CPU percentages - [#2123](https://github.com/influxdata/telegraf/pull/2123): Fix improper calculation of CPU percentages
@ -19,6 +23,7 @@
- [#1908](https://github.com/influxdata/telegraf/pull/1908): RabbitMQ Connection metrics. - [#1908](https://github.com/influxdata/telegraf/pull/1908): RabbitMQ Connection metrics.
- [#1937](https://github.com/influxdata/telegraf/pull/1937): HAProxy session limit metric. - [#1937](https://github.com/influxdata/telegraf/pull/1937): HAProxy session limit metric.
- [#2068](https://github.com/influxdata/telegraf/issues/2068): Accept strings for StatsD sets. - [#2068](https://github.com/influxdata/telegraf/issues/2068): Accept strings for StatsD sets.
- [#1893](https://github.com/influxdata/telegraf/issues/1893): Change StatsD default "reset" behavior.
### Bugfixes ### Bugfixes

View File

@ -7,14 +7,19 @@
[[inputs.statsd]] [[inputs.statsd]]
## Address and port to host UDP listener on ## Address and port to host UDP listener on
service_address = ":8125" service_address = ":8125"
## Delete gauges every interval (default=false)
delete_gauges = false ## The following configuration options control when telegraf clears it's cache
## Delete counters every interval (default=false) ## of previous values. If set to false, then telegraf will only clear it's
delete_counters = false ## cache when the daemon is restarted.
## Delete sets every interval (default=false) ## Reset gauges every interval (default=true)
delete_sets = false delete_gauges = true
## Delete timings & histograms every interval (default=true) ## Reset counters every interval (default=true)
delete_counters = true
## Reset sets every interval (default=true)
delete_sets = true
## Reset timings & histograms every interval (default=true)
delete_timings = true delete_timings = true
## Percentiles to calculate for timing & histogram stats ## Percentiles to calculate for timing & histogram stats
percentiles = [90] percentiles = [90]

View File

@ -136,14 +136,19 @@ func (_ *Statsd) Description() string {
const sampleConfig = ` const sampleConfig = `
## Address and port to host UDP listener on ## Address and port to host UDP listener on
service_address = ":8125" service_address = ":8125"
## Delete gauges every interval (default=false)
delete_gauges = false ## The following configuration options control when telegraf clears it's cache
## Delete counters every interval (default=false) ## of previous values. If set to false, then telegraf will only clear it's
delete_counters = false ## cache when the daemon is restarted.
## Delete sets every interval (default=false) ## Reset gauges every interval (default=true)
delete_sets = false delete_gauges = true
## Delete timings & histograms every interval (default=true) ## Reset counters every interval (default=true)
delete_counters = true
## Reset sets every interval (default=true)
delete_sets = true
## Reset timings & histograms every interval (default=true)
delete_timings = true delete_timings = true
## Percentiles to calculate for timing & histogram stats ## Percentiles to calculate for timing & histogram stats
percentiles = [90] percentiles = [90]
@ -654,8 +659,13 @@ func (s *Statsd) Stop() {
func init() { func init() {
inputs.Add("statsd", func() telegraf.Input { inputs.Add("statsd", func() telegraf.Input {
return &Statsd{ return &Statsd{
ServiceAddress: ":8125",
MetricSeparator: "_", MetricSeparator: "_",
AllowedPendingMessages: defaultAllowPendingMessage, AllowedPendingMessages: defaultAllowPendingMessage,
DeleteCounters: true,
DeleteGauges: true,
DeleteSets: true,
DeleteTimings: true,
} }
}) })
} }