plugins/inputs/statsd: enforce minimum allowed_pending_messages
This commit is contained in:
parent
4f06f6b3d8
commit
2fe3e7f1c8
|
@ -38,6 +38,7 @@ continue sending logs to /var/log/telegraf/telegraf.log.
|
|||
|
||||
### Bugfixes
|
||||
|
||||
- [#1870](https://github.com/influxdata/telegraf/pull/1870): plugins/inputs/statsd: enforce minimum allowed_pending_messages
|
||||
- [#1746](https://github.com/influxdata/telegraf/issues/1746): Fix handling of non-string values for JSON keys listed in tag_keys.
|
||||
- [#1628](https://github.com/influxdata/telegraf/issues/1628): Fix mongodb input panic on version 2.2.
|
||||
- [#1733](https://github.com/influxdata/telegraf/issues/1733): Fix statsd scientific notation parsing
|
||||
|
|
|
@ -236,6 +236,11 @@ func (s *Statsd) Gather(acc telegraf.Accumulator) error {
|
|||
func (s *Statsd) Start(_ telegraf.Accumulator) error {
|
||||
// Make data structures
|
||||
s.done = make(chan struct{})
|
||||
|
||||
if s.AllowedPendingMessages < 1 {
|
||||
log.Printf("I! statsd: allowed_pending_messages < 1 not allowed (%v) set to 1", s.AllowedPendingMessages)
|
||||
s.AllowedPendingMessages = 1
|
||||
}
|
||||
s.in = make(chan []byte, s.AllowedPendingMessages)
|
||||
|
||||
if prevInstance == nil {
|
||||
|
|
Loading…
Reference in New Issue