diff --git a/plugins/inputs/tcp_listener/tcp_listener.go b/plugins/inputs/tcp_listener/tcp_listener.go index a8827c037fb29..1777491d6fe80 100644 --- a/plugins/inputs/tcp_listener/tcp_listener.go +++ b/plugins/inputs/tcp_listener/tcp_listener.go @@ -56,10 +56,10 @@ const sampleConfig = ` ## Number of TCP messages allowed to queue up. Once filled, the ## TCP listener will start dropping packets. - allowed_pending_messages = 10000 + # allowed_pending_messages = 10000 ## Maximum number of concurrent TCP connections to allow - max_tcp_connections = 250 + # max_tcp_connections = 250 ## Data format to consume. ## Each data format has it's own unique set of configuration options, read @@ -276,6 +276,9 @@ func (t *TcpListener) remember(id string, conn *net.TCPConn) { func init() { inputs.Add("tcp_listener", func() telegraf.Input { - return &TcpListener{} + return &TcpListener{ + AllowedPendingMessages: 10000, + MaxTCPConnections: 250, + } }) } diff --git a/plugins/inputs/udp_listener/udp_listener.go b/plugins/inputs/udp_listener/udp_listener.go index d2c4d0bbc5eff..4ea631b50abf3 100644 --- a/plugins/inputs/udp_listener/udp_listener.go +++ b/plugins/inputs/udp_listener/udp_listener.go @@ -55,7 +55,7 @@ const sampleConfig = ` ## Number of UDP messages allowed to queue up. Once filled, the ## UDP listener will start dropping packets. - allowed_pending_messages = 10000 + # allowed_pending_messages = 10000 ## Data format to consume. ## Each data format has it's own unique set of configuration options, read @@ -178,6 +178,8 @@ func (u *UdpListener) udpParser() error { func init() { inputs.Add("udp_listener", func() telegraf.Input { - return &UdpListener{} + return &UdpListener{ + AllowedPendingMessages: 10000, + } }) }