-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TCP listener for statsd input #2293
Conversation
This reverts commit 6623b4b.
This reverts commit 6623b4b.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As you mentioned this code is heavily based on the tcp_listener plugin, but that plugin was deprecated and replaced with socket_listener.
While it might be nicer if this was based on the newer socket_listener code, I think this might be quite a bit more work, as the existing statsd plugin is similar to the old udp_listener.
One concern I have is that I often see intermittent errors with the udp_listener when running unittests. Though looking through the github issues I don't see many reported issues. @phemmer Do you have a sense of if this code might be problematic due to being based on tcp_listener?
CHANGELOG.md
Outdated
@@ -96,6 +97,7 @@ be deprecated eventually. | |||
- [#2732](https://github.com/influxdata/telegraf/pull/2732): Use go 1.8.1 | |||
- [#2712](https://github.com/influxdata/telegraf/issues/2712): Documentation for rabbitmq input plugin | |||
- [#2141](https://github.com/influxdata/telegraf/pull/2141): Logparser handles newly-created files. | |||
- [#2293](https://github.com/influxdata/telegraf/pull/2293): Add TCP listener for statsd input |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this line, looks a leftover from a rebase.
plugins/inputs/statsd/statsd.go
Outdated
// Tell the connection why we are closing. | ||
fmt.Fprintf(conn, "Telegraf maximum concurrent TCP connections (%d)"+ | ||
" reached, closing.\nYou may want to increase max_tcp_connections in"+ | ||
" the Telegraf tcp listener configuration.\n", s.MaxTCPConnections) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am assuming this is not part of the statsd protocol, any chance this will confuse a tcp statsd implementation? Maybe we should just close the connection?
The only part of the But neither of these is a major issue, so the code should be fine to use. |
So, just need to discuss my code comments. In the future we can rebuild stastd input on socket_listener. |
I can't do the work in next two weeks. After that no problem and I will fix all from comments and stay with tcp_listener (working on our prod from 3 months by now). Is this ok with 1.4.0 release plan ? |
@szibis Cutoff for 1.4 features is currently around the 16th of August. |
@danielnelson all comments fixed |
CHANGELOG.md
Outdated
@@ -50,6 +51,7 @@ | |||
- [#3063](https://github.com/influxdata/telegraf/pull/3063): Add tls options to docker input. | |||
- [#2387](https://github.com/influxdata/telegraf/pull/2387): Add histogram aggregator plugin. | |||
- [#3080](https://github.com/influxdata/telegraf/pull/3080): Add zipkin input plugin. | |||
- [#2293](https://github.com/influxdata/telegraf/pull/2293): Add TCP listener for statsd input |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is added twice and there is a merge conflict. Recently I have been adding the changelog updates separately to avoid these merge issues, so you can just remove all changes to this file.
Required for all PRs:
This PR adds TCP listener based on tcp_listener input code. We need TCP listener for statsd input in cloud environment's where UDP balancing is not available and for more reliable communication.
This is missing feature that is supported in etsy statsd - https://github.com/etsy/statsd/blob/master/docs/server.md