-
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
Implementing graphite protocol metricbeat module #4734
Conversation
Can one of the admins verify this patch? |
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically on build-eu-00. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
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.
Thanks for the contribution @vjsamuel! I just did a first pass, the module is looking good, some tests would help :)
@@ -42,5 +42,9 @@ The following metricsets are available: | |||
|
|||
* <<metricbeat-metricset-http-json,json>> | |||
|
|||
* <<metricbeat-metricset-http-server,server>> |
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 think http server metricset is spurious previous to a rename to graphite? also present here: https://github.com/elastic/beats/pull/4734/files#diff-8303434bf263f758175d97b66f919690R48
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 was a wrong checkin from another metricset :) will follow in a subsequent PR. i have removed it from this one.
metricbeat/helper/server/tcp/tcp.go
Outdated
conn.Close() | ||
} | ||
}() | ||
buffer := make([]byte, g.receiveBufferSize) |
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 can be optimized out of the loop, what do you think=
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.
done
metricbeat/helper/server/udp/udp.go
Outdated
func (g *UdpServer) WatchMetrics() { | ||
|
||
for { | ||
buffer := make([]byte, g.receiveBufferSize) |
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.
same thing for this buffer
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.
done
} | ||
|
||
func NewMetricProcessor(templates []templateConfig, defaultTemplate templateConfig) metricProcessor { | ||
|
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.
minor thing, but recently we have been trying to avoid new lines at the start and end of functions: #4670
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.
done
c3a5056
to
06c17cf
Compare
Check is failing because of goimports format, you can do |
@@ -0,0 +1,4 @@ | |||
- module: graphite | |||
metricsets: ["server"] | |||
enabled: true |
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.
What do you think about adding some (commented) template examples here?
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.
done
b65ae24
to
63711bf
Compare
jenkins test it please |
b4f4080
to
e5e4423
Compare
jenkins test it please |
e5e4423
to
b28ceb6
Compare
jenkins test it please |
1 similar comment
jenkins test it please |
* Implementing graphite protocol metricbeat module
No description provided.