美文网首页
Elasticsearch output plugin(翻译)

Elasticsearch output plugin(翻译)

作者: Veekend | 来源:发表于2017-08-25 16:23 被阅读115次

Elasticsearch output plugin
Plugin version: v7.3.6
版本:v7.3.6
Released on: 2017-06-23
日期:2017-06-23
Changelog

Getting Help
For questions about the plugin, open a topic in the Discuss forums. For bugs or feature requests, open an issue in Github. For the list of Elastic supported plugins, please consult the Elastic Support Matrix.
有关插件的问题,打开Discuss 论坛中的主题。对于bugs和特性的询问,在Github查看问题。对于一系列Elastic支持的插件,请参阅Elastic Support Matrix

Description

Compatibility Note 兼容性说明

Starting with Elasticsearch 5.3, there’s an HTTP setting called http.content_type.required. If this option is set to true, and you are using Logstash 2.4 through 5.2, you need to update the Elasticsearch output plugin to version 6.2.5 or higher.
从Elasticsearch 5.3开始,有一个名为http.content_type.required的HTTP设置。 如果此选项设置为true,并且您使用Logstash 2.4至5.2,则需要将Elasticsearch输出插件更新到版本6.2.5或更高版本。
This plugin is the recommended method of storing logs in Elasticsearch. If you plan on using the Kibana web interface, you’ll want to use this output.
这个插件是在Elasticsearch中存储日志的推荐方法。 如果您打算使用Kibana Web界面,则需要使用此输出。
This output only speaks the HTTP protocol. HTTP is the preferred protocol for interacting with Elasticsearch as of Logstash 2.0. We strongly encourage the use of HTTP over the node protocol for a number of reasons. HTTP is only marginally slower, yet far easier to administer and work with. When using the HTTP protocol one may upgrade Elasticsearch versions without having to upgrade Logstash in lock-step.
此输出仅用于HTTP协议。 HTTP是与Logstash 2.0一起与Elasticsearch进行交互的首选协议。 由于许多原因,我们强烈建议在节点协议上使用HTTP。 HTTP只是稍微慢一点,但更容易管理和使用。 使用HTTP协议时,可以升级Elasticsearch版本,而无需在锁定步骤中升级Logstash。
You can learn more about Elasticsearch at https://www.elastic.co/products/elasticsearch

Template management for Elasticsearch 5.x
Index template for this version (Logstash 5.0) has been changed to reflect Elasticsearch’s mapping changes in version 5.0. Most importantly, the subfield for string multi-fields has changed from .raw
to .keyword to match ES default behavior.
此版本的索引模板(Logstash 5.0)已更改,以对应Elasticsearch5.0版本中的映射更改。 最重要的是,字符串多字段的子字段已经从.raw改变为.keyword来匹配ES默认行为。
Users installing ES 5.x and LS 5.x ** This change will not affect you and you will continue to use the ES defaults.
安装ES 5.x和LS 5.x的用户**此更改不会影响您,您将继续使用ES默认值。
Users upgrading from LS 2.x to LS 5.x with ES 5.x ** LS will not force upgrade the template, if logstash template already exists. This means you will still use .raw for sub-fields coming from 2.x. If you choose to use the new template, you will have to reindex your data after the new template is installed.
如果logstash模板已经存在,则使用ES 5.x ** LS从LS 2.x升级到LS 5.x将不会强制升级模板。 这意味着您仍然会使用.raw从2.x的子字段。 如果您选择使用新模板,则必须在安装新模板后重新编号数据。

Retry Policy
The retry policy has changed significantly in the 2.2.0 release. This plugin uses the Elasticsearch bulk API to optimize its imports into Elasticsearch. These requests may experience either partial or total failures.
2.2.0版本中的重试策略发生了重大变化。 此插件使用Elasticsearch大量API来优化其导入到Elasticsearch。 这些请求可能会遇到部分或全部故障。
The following errors are retried infinitely:遇到以下错误将会马上重试:
Network errors (inability to connect)
429 (Too many requests) and
503 (Service unavailable) errors
409 exceptions are no longer retried. Please set a higher retry_on_conflict value if you experience 409 exceptions. It is more performant for Elasticsearch to retry these exceptions than this plugin.
409报错不再重试。 如果遇到409报错,请设置一个更高的retry_on_conflict值。 弹性搜索比这个插件重试这些异常更有效果。

Batch Sizes
This plugin attempts to send batches of events as a single request. However, if a request exceeds 20MB we will break it up until multiple batch requests. If a single document exceeds 20MB it will be sent as a single request.
此插件尝试将批次事件作为单个请求发送。 但是,如果一个请求超过20MB,我们会将其分解到多个批处理请求。 如果单个文档超过20MB,它将作为单个请求发送。

DNS Caching
This plugin uses the JVM to lookup DNS entries and is subject to the value of [networkaddress.cache.ttl]
(https://docs.oracle.com/javase/7/docs/technotes/guides/net/properties.html), a global setting for the JVM.
As an example, to set your DNS TTL to 1 second you would set the LS_JAVA_OPTS environment variable to Dnetworkaddress.cache.ttl=1
Keep in mind that a connection with keepalive enabled will not reevaluate its DNS value while the keepalive is in effect.
该插件使用JVM查找DNS条目,并受到networkaddress.cache.ttl(JVM的全局设置)的值的约束。
例如,要将DNS TTL设置为1秒,您可以将LS_JAVA_OPTS环境变量设置为-Dnetworkaddress.cache.ttl = 1。
请注意,启用keepalive的连接在keepalive生效时不会重新评估其DNS值。

HTTP Compression
This plugin supports request and response compression. Response compression is enabled by default and for Elasticsearch versions 5.0 and later, the user doesn’t have to set any configs in Elasticsearch for it to send back compressed response. For versions before 5.0, http.compression must be set to true in Elasticsearch[https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-http.html#modules-http] to take advantage of response compression when using this plugin
For requests compression, regardless of the Elasticsearch version, users have to enable http_compression setting in their Logstash config file.
此插件支持请求和响应压缩。 默认情况下启用响应压缩,对于Elasticsearch版本5.0及更高版本,用户不必在Elasticsearch中设置任何配置来发送压缩响应。 对于5.0之前的版本,在Elasticsearch [https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-http.html#modules-http]中必须将http.compression设置为true,以利用 使用此插件时的响应压缩
对于请求压缩,无论Elasticsearch版本如何,用户必须在其Logstash配置文件中启用http_compression设置。

相关文章

网友评论

      本文标题:Elasticsearch output plugin(翻译)

      本文链接:https://www.haomeiwen.com/subject/aonudxtx.html