-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Allow TCP helper to support delimiters #8278
Conversation
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
} | ||
} | ||
|
||
func (t *TcpConfig) Validate() error { |
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.
exported method TcpConfig.Validate should have comment or be unexported
e4af891
to
f1f1d29
Compare
filebeat/inputsource/tcp/client.go
Outdated
@@ -43,6 +43,8 @@ type client struct { | |||
timeout time.Duration | |||
} | |||
|
|||
type ClientFactory func() *client |
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.
exported type ClientFactory should have comment or be unexported
f1f1d29
to
8463bff
Compare
8463bff
to
0a9d978
Compare
metricbeat/helper/server/tcp/tcp.go
Outdated
|
||
// Close connection when this function ends | ||
defer func() { | ||
if conn != nil { |
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.
Can conn
be nil here? I'd rather return immediately if that is the case.
@jsoriano thank you for the quick review and merge |
(cherry picked from commit eeb1d3b)
(cherry picked from commit ff566e7)
There are TCP payloads coming in from graphite carbon forwarders into metricbeat that have many metrics separated by '\n`. What happens is that only the first event is parsed and the rest are dropped.
This PR attempts to allow TCP helper to accept a delimiter character which can be used to split the bytes coming in to the socket and create events for each one of them.