Advertisement

Logstash 从mysql迁移至Elasticsearch(进行全量导入)

阅读量:
  1. 所采用的elasticsearch系统版本为7.1.1

  2. logstash组件的版本号同样为7.1.1

步骤

  1. 在logstash目录中创建名为mysql_plugin的子目录
  2. 在该子目录内生成一个名为xxxx.conf的配置文件,文件名称可根据需求自定义
  3. 编写对应的sql文件

xxx.conf

复制代码
 input {

    
     stdin {
    
     }
    
     jdbc {
    
    
    
       jdbc_connection_string => "jdbc:mysql://localhost:3306/yourdatabase?characterEncoding=UTF-8&useSSL=false"
    
  
    
       jdbc_user => "yourname"
    
       jdbc_password => "password"
    
  
    
       jdbc_driver_library => "D:/tools/gradle-4.10.3/repository/caches/modules-2/files-2.1/mysql/mysql-connector-

全部评论 (0)

还没有任何评论哟~