Skip to content

Commit

Permalink
udp_listener & tcp_listener set default values
Browse files Browse the repository at this point in the history
closes #1936
  • Loading branch information
sparrc committed Oct 26, 2016
1 parent b1a97e3 commit e74958c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
9 changes: 6 additions & 3 deletions plugins/inputs/tcp_listener/tcp_listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
}
})
}
6 changes: 4 additions & 2 deletions plugins/inputs/udp_listener/udp_listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -178,6 +178,8 @@ func (u *UdpListener) udpParser() error {

func init() {
inputs.Add("udp_listener", func() telegraf.Input {
return &UdpListener{}
return &UdpListener{
AllowedPendingMessages: 10000,
}
})
}

0 comments on commit e74958c

Please sign in to comment.