[英]Elasticsearch to index RDBMS data
These are three simple questions which was surprisingly hard to find definite answers. 这是三个简单的问题,难以找到明确的答案。
I'm surprised there isn't any solid answer as yet for this. 令我感到惊讶的是,目前还没有任何可靠的答案。 So here's the solution. 所以这是解决方案。 Logstash directly gives us the ability to push data from a RDBMS into Elasticsearch. Logstash直接使我们能够将数据从RDBMS推送到Elasticsearch。
Here's a link to a tutorial which tell you how to go about it. 这是一个教程的链接,告诉你如何去做。 Briefly(all details in link 1), you simply need a JDBC driver for the relational database you'll be using (Postgres, MySQL etc) and make a config file specifying your input as the Relational Database and your output as Elasticsearch. 简单地说(链接1中的所有细节),您只需要一个JDBC驱动程序用于您将使用的关系数据库(Postgres,MySQL等),并创建一个配置文件,将输入指定为关系数据库,输出指定为Elasticsearch。 You can also specify a cron which would allow you to keep updating one regular intervals. 您还可以指定一个允许您不断更新一个定期间隔的cron。
Here's the article which mentions the configuration and gets you started (See Example 2): https://www.elastic.co/blog/logstash-jdbc-input-plugin 这篇文章提到了配置并让你入门(参见例2): https : //www.elastic.co/blog/logstash-jdbc-input-plugin
Here's the article which tells you how to configure the Cronjob as such: https://www.elastic.co/guide/en/logstash/current/plugins-inputs-jdbc.html#_scheduling 这篇文章告诉你如何配置Cronjob: https ://www.elastic.co/guide/en/logstash/current/plugins-inputs-jdbc.html#_scheduling
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.