One - One Code All

Blog Content

数据迁移从ES到postgresql,logstash的logstash-input-jdbc插件安装

PostgreSQL   2020-04-14 10:46:27

数据迁移从ES到postgresql,logstash的logstash-input-jdbc插件安装。


调研了部分工具。


  • elasticsearch-jdbc 好久不维护了。

  • pg-es-fdw  好久不维护了。

  • Logstash-input-jdbc:  ruby的,版本和维护什么的跟得上,准备实验一下。


下载elasticsearch6.7.2和logstash6.7.2 并安装。

参考网址: https://mirrors.huaweicloud.com/logstash/6.7.2/logstash-6.7.2.zip


下载ruby并安装。并更新源。参考:https://gems.ruby-china.com/ 

 gem update --system # 这里请翻墙一下
 gem -v
 gem sources --add https://gems.ruby-china.com/ --remove https://rubygems.org/
 gem sources -l
 # 确保只有 gems.ruby-china.com
 # 用 Bundler 的 Gem 源代码镜像命令。
 bundle config mirror.https://rubygems.org https://gems.ruby-china.com



下载logstash-input-jdbc并安装

https://github.com/logstash-plugins/logstash-input-jdbc/releases
wget https://codeload.github.com/logstash-plugins/logstash-input-jdbc/zip/v4.3.19
unzip logstash-input-jdbc-4.3.19
gem build logstash-input-jdbc.gemspec
# 最终得到:logstash-input-jdbc.gem

进行安装

logstash-plugin.bat install ../logstash-input-jdbc-4.3.19/logstash-input-jdbc-4.3.19.gem

提示信息如下表示成功

Validating ../logstash-input-jdbc-4.3.19/logstash-input-jdbc-4.3.19.gem
Installing logstash-input-jdbc
Installation successful



上一篇: postgresql里json与jsonb中的-> 和 ->>区别
下一篇:postgresql安装包rpm下载安装

The minute you think of giving up, think of the reason why you held on so long.