Skip to content

Cherry-pick #11217 to 6.7: Always send _type to Monitoring Bulk API#11229

Merged
ycombinator merged 1 commit intoelastic:6.7from
ycombinator:backport_11217_6.7
Mar 13, 2019
Merged

Cherry-pick #11217 to 6.7: Always send _type to Monitoring Bulk API#11229
ycombinator merged 1 commit intoelastic:6.7from
ycombinator:backport_11217_6.7

Conversation

@ycombinator
Copy link
Copy Markdown
Contributor

Cherry-pick of PR #11217 to 6.7 branch. Original message:

The Monitoring Bulk API (POST _xpack/monitoring/_bulk) does not interpret _type in the bulk metadata the same was as the regular Bulk API (POST _bulk). In the case of the Monitoring Bulk API, _type has a special meaning. It does not correspond to the Elasticsearch document _type but rather a type field within monitoring documents. The _type of those monitoring documents gets automatically set to _doc by the Monitoring Bulk API.

Therefore, the Beats monitoring code should always send _type to the Monitoring Bulk API.

The Monitoring Bulk API (`POST _xpack/monitoring/_bulk`) does not interpret `_type` in the bulk metadata the same was as the regular Bulk API (`POST _bulk`). In the case of the Monitoring Bulk API, `_type` has a special meaning. It does not correspond to the Elasticsearch document `_type` but rather a `type` field within monitoring documents. The `_type` of those monitoring documents gets automatically set to `_doc` by the Monitoring Bulk API.

Therefore, the Beats monitoring code should always send `_type` to the Monitoring Bulk API.

(cherry picked from commit ac72b5c)
@ycombinator
Copy link
Copy Markdown
Contributor Author

jenkins, test this

@ycombinator ycombinator requested a review from jakelandis March 13, 2019 18:50
Copy link
Copy Markdown

@jakelandis jakelandis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ycombinator ycombinator merged commit 90c45c7 into elastic:6.7 Mar 13, 2019
@ycombinator ycombinator deleted the backport_11217_6.7 branch March 13, 2019 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants