-
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
Always use create op_type with ES 7.5+ #13936
Conversation
Elasticsearch introduces the `create_doc` privilege, which always requires the op_type to be `create`. We would like to take advantage of this, in order to reduces the privileges Beats users have to set for Beats. In the future Elasticsearch will support `op_type == create` if documents without ID are indexed, but older Elasticsearch versions don't. This change always uses `op_type == create` when the Elasticsearch version is 7.5+.
262d12f
to
f0e52a8
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.
LGTM.
@urso Can we add this for publishing monitoring events as well? Even with this change, that still requires a |
@cwurm Not sure. The internal monitoring approach pushes to a special X-Pack endpoint, that is provided by a plugin in Elasticsearch. Some logic for creating indices and such is in the plugin, not on the Beats side. |
#9260 selects the bulk API based on configuration. Didn't notice that it uses another API as is modified here. @ycombinator can you follow up on the monitoring output? |
Yes, thanks for the ping. I will follow up with a PR to make the necessary changes for the monitoring output. |
PR for the analogous change in the libbeat monitoring ES client is up: #14313 |
Elasticsearch introduces the
create_doc
privilege, which alwaysrequires the op_type to be
create
. We would like to take advantage ofthis, in order to reduces the privileges Beats users have to set for
Beats.
In the future Elasticsearch will support
op_type == create
ifdocuments without ID are indexed, but older Elasticsearch versions
don't.
This change always uses
op_type == create
when the Elasticsearchversion is 7.5+.
Related ES changes: