Skip to content

Cherry-pick #11217 to 7.0: Always send _type to Monitoring Bulk API#11227

Merged
ruflin merged 1 commit intoelastic:7.0from
ruflin:backport_11217_7.0
Mar 19, 2019
Merged

Cherry-pick #11217 to 7.0: Always send _type to Monitoring Bulk API#11227
ruflin merged 1 commit intoelastic:7.0from
ruflin:backport_11217_7.0

Conversation

@ruflin
Copy link
Copy Markdown
Contributor

@ruflin ruflin commented Mar 13, 2019

Cherry-pick of PR #11217 to 7.0 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)
@ruflin ruflin requested a review from a team as a code owner March 13, 2019 13:39
@ycombinator
Copy link
Copy Markdown
Contributor

jenkins, test this

1 similar comment
@ycombinator
Copy link
Copy Markdown
Contributor

jenkins, test this

@ruflin ruflin merged commit 8c32413 into elastic:7.0 Mar 19, 2019
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.

3 participants