-
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
Add http server metricset to support push metrics via http #4770
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? |
} | ||
|
||
func (h *HttpServer) handleFunc(writer http.ResponseWriter, req *http.Request) { | ||
if req.Method == "POST" { |
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 we should provide a friendly response if it's not POST, at least implement a GET message?
# paths: | ||
# - path: "/foo" | ||
# namespace: "foo" | ||
# tags: |
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 it would make sense to change this behavior, use fields
instead of tags, and put given fields in the final event, overriding any existing one, what do you think?
CHANGELOG.asciidoc
Outdated
@@ -52,7 +52,7 @@ https://github.com/elastic/beats/compare/v6.0.0-beta1...master[Check the HEAD di | |||
|
|||
- Add support to exclude labels from kubernetes pod metadata. {pull}4757[4757] | |||
- Add graphite protocol metricbeat module. {pull}4734[4734] | |||
|
|||
- Add http server metricset to support push metrics via http. {pull}4770[4770] |
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.
Missing newline after this
908e001
to
b65150f
Compare
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 happens if the port is already taken? What happens when the same metricset is defined twice with the same port? What happens if reloading is used and part is already used? Trying to make sure we thought of the edge cases.
metricbeat/docs/fields.asciidoc
Outdated
|
||
|
||
[float] | ||
=== http.server.example |
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.
We probably should not have "example" fields in the docs.
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 have removed this field from the asciidoc. during restart/multiple definitions we would error out with a critical message saying port is already in use.
ok to test |
You may want to take a look to travis tests, the fail looks legit |
* Implementing graphite protocol metricbeat module
jenkins retest this |
This PR allows users to configure a http server in order to send data. The restriction right now it only supports JSON.
Path parameters can be parsed into tags. Ex:
/foo/bar would result in