Use different monitoring bulk API paths depending on ES version#11203
Merged
ycombinator merged 3 commits intoelastic:masterfrom Mar 19, 2019
ycombinator:replace-monitoring-endpoint
Merged
Use different monitoring bulk API paths depending on ES version#11203ycombinator merged 3 commits intoelastic:masterfrom ycombinator:replace-monitoring-endpoint
ycombinator merged 3 commits intoelastic:masterfrom
ycombinator:replace-monitoring-endpoint
Conversation
Contributor
|
Pinging @elastic/stack-monitoring |
Contributor
Author
|
Blocked by #11204. |
|
The paths look correct, and that probably as much I am competent to review here, so (lowercase) lgtm |
urso
reviewed
Mar 14, 2019
urso
left a comment
There was a problem hiding this comment.
I wish we would not have to pass the versions to MonitoringBulkWith. Actually (*Connection) stores the versions, but this means that one has to call Connect before using this method.
Contributor
Author
|
more like: |
Contributor
Author
|
@urso I made the change per your review suggestion. This is ready for your 👀 again. Thanks! |
cachedout
approved these changes
Mar 18, 2019
ycombinator
added a commit
that referenced
this pull request
Mar 19, 2019
…pending on ES version (#11323) Cherry-pick of PR #11203 to 7.0 branch. Original message: Resolves #9480. Starting Elasticsearch 7.0.0, Beats should ship their monitoring data to the `_monitoring/bulk` Elasticsearch API endpoint. Prior to 7.0.0, `_xpack/monitoring/_bulk` should be used. This PR implements this version-based conditional logic. I used Wireshark to look at the ES API endpoints being hit. Running this PR with ES 8.0.0 or ES 7.0.0, I confirmed that the `POST _monitoring/bulk` endpoint was being hit: <img width="1436" alt="Screen Shot 2019-03-14 at 10 55 52 AM" src="https://user-images.githubusercontent.com/51061/54380101-ed567780-4647-11e9-8ed1-9b9020bb85d4.png"> And running this PR with ES 6.7.0, I confirmed that the `POST _xpack/monitoring/_bulk` endpoint was being hit: <img width="1437" alt="Screen Shot 2019-03-14 at 10 56 42 AM" src="https://user-images.githubusercontent.com/51061/54380094-eaf41d80-4647-11e9-8658-d9a6ba14541b.png">
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #9480.
Starting Elasticsearch 7.0.0, Beats should ship their monitoring data to the
_monitoring/bulkElasticsearch API endpoint. Prior to 7.0.0,_xpack/monitoring/_bulkshould be used. This PR implements this version-based conditional logic.I used Wireshark to look at the ES API endpoints being hit.
Running this PR with ES 8.0.0 or ES 7.0.0, I confirmed that the
POST _monitoring/bulkendpoint was being hit:And running this PR with ES 6.7.0, I confirmed that the
POST _xpack/monitoring/_bulkendpoint was being hit: