Logstash Elasticsearch输入插件,用于流式传输数据 [英] Logstash Elasticsearch Input Plugin for streaming data
问题描述
我想知道我们是否可以使用logstash-input-elasticsearch插件来流式传输数据,例如:如果我的数据库中有可用数据并且运行ElasticSearch输入插件,它将把数据索引到输出中,但是如果一段时间后,会有更多数据从ElasticSearch数据库进入,ElasticSearch输入插件是否能够在不重新启动logstash的情况下为该数据建立索引?
I would like to know if we can use logstash-input-elasticsearch plugin for streaming data , ex: if I have data available in my database and I run ElasticSearch input plugin , it will index the data into an output, but if after some time more data comes of ElasticSearch database , Is ElasticSearch input plugin is able to index that data without restarting the logstash ?
感谢您的关注和帮助.
推荐答案
默认情况下,elasticsearch
输入将在ES实例上运行滚动查询,抽取与查询匹配的文档,将其流式传输到输出中,完成后Logstash将关闭.
By default, the elasticsearch
input will run a scroll query on your ES instance, pump the documents matching the query, stream them to your outputs and when done Logstash will shut down.
但是,您可以做的是建立一个cron作业,该作业将定期启动Logstash管道并查询ES中存在的新文档.
However, what you can do is set up a cron job that will start your Logstash pipeline at regular intervals and queries the new documents present in ES.
这篇关于Logstash Elasticsearch输入插件,用于流式传输数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!