Elasticsearch和mysql数据同步(logstash)
1、版本介绍
The use of bin/plugin is deprecated and will be removed in a feature release. Please use bin/logstash-plugin.
Validating logstash-input-jdbc
Installing logstash-input-jdbc
Installation successful
jdbc {
jdbc_driver_library => "/usr/local/logstash-2.4.0/mysql-connector-java-5.1.39.jar"
jdbc_driver_class => "com.mysql.jdbc.Driver"
jdbc_connection_string => "jdbc:mysql://192.168.****:3306/******?characterEncoding=UTF-8&useSSL=false"
jdbc_user => "*****"
jdbc_password => "*********"
statement => "SELECT * FROM news limit 0,1"
jdbc_paging_enabled => "true"
jdbc_page_size => "50000"
schedule => "* * * * *"
}
}
filter {
json {
source => "message"
remove_field => ["message"]
}
}
output {
stdout {
codec => rubydebug
}
elasticsearch {
hosts => "192.168.****"
index => "myindex"
}
}
Pipeline main started
{
"pk" => 8,
"user_pk" => 11,
"media_pk" => 5,
"topic_pk" => 0
}
{
"pk" => 8,
"user_pk" => 11,
"media_pk" => 5,
"topic_pk" => 0
}
health status index pri rep docs.count docs.deleted store.size pri.store.size
green open test 5 1 0 0 1.5kb 795b
green open myindex 5 1 494 0 924.7kb 457.6kb
[root@VS-zsz conf]# curl '192.168.31.78:9200/_cat/indices?v'
health status index pri rep docs.count docs.deleted store.size pri.store.size
green open test 5 1 0 0 1.5kb 795b
green open myindex 5 1 494 0 925kb 457.8kb
[root@VS-zsz conf]# curl '192.168.31.79:9200/_cat/indices?v'
health status index pri rep docs.count docs.deleted store.size pri.store.size
green open test 5 1 0 0 1.5kb 795b
green open myindex 5 1 494 0 925kb 457.8kb
Elasticsearch和mysql数据同步(logstash)的更多相关文章
- Elasticsearch和mysql数据同步(elasticsearch-jdbc)
1.介绍 对mysql.oracle等数据库数据进行同步到ES有三种做法:一个是通过elasticsearch提供的API进行增删改查,一个就是通过中间件进行数据全量.增量的数据同步,另一个是通过收集 ...
- 几篇关于MySQL数据同步到Elasticsearch的文章---第一篇:Debezium实现Mysql到Elasticsearch高效实时同步
文章转载自: https://mp.weixin.qq.com/s?__biz=MzI2NDY1MTA3OQ==&mid=2247484358&idx=1&sn=3a78347 ...
- Mysql数据同步Elasticsearch方案总结
Mysql数据同步Elasticsearch方案总结 https://my.oschina.net/u/4000872/blog/2252620
- ElasticSearch5+logstash的logstash-input-jdbc实现mysql数据同步
在实现的路上遇到了各种坑,再次验证官方文档只能产考不能全信! ElasticSearch安装就不说了上一篇有说! 安装logstash 官方:https://www.elastic.co/guide/ ...
- mysql数据同步到Elasticsearch
1.版本介绍 Elasticsearch: https://www.elastic.co/products/elasticsearch 版本:2.4.0 Logstash: https://www ...
- 几篇关于MySQL数据同步到Elasticsearch的文章---第五篇:logstash-input-jdbc实现mysql 与elasticsearch实时同步深入详解
文章转载自: https://blog.csdn.net/laoyang360/article/details/51747266 引言: elasticsearch 的出现使得我们的存储.检索数据更快 ...
- 几篇关于MySQL数据同步到Elasticsearch的文章---第三篇:logstash_output_kafka:Mysql同步Kafka深入详解
文章转载自: https://mp.weixin.qq.com/s?__biz=MzI2NDY1MTA3OQ==&mid=2247484411&idx=1&sn=1f5a371 ...
- 几篇关于MySQL数据同步到Elasticsearch的文章---第二篇:canal 实现Mysql到Elasticsearch实时增量同步
文章转载自: https://mp.weixin.qq.com/s?__biz=MzI2NDY1MTA3OQ==&mid=2247484377&idx=1&sn=199bc88 ...
- 几篇关于MySQL数据同步到Elasticsearch的文章---第四篇:使用go-mysql-elasticsearch同步mysql数据库信息到ElasticSearch
文章转载自: https://www.cnblogs.com/dalaoyang/p/11018541.html 1.go-mysql-elasticsearch简介 go-mysql-elastic ...
随机推荐
- UVa 10256 (判断两个凸包相离) The Great Divide
题意: 给出n个红点,m个蓝点.问是否存在一条直线使得红点和蓝点分别分布在直线的两侧,这些点不能再直线上. 分析: 求出两种点的凸包,如果两个凸包相离的话,则存在这样一条直线. 判断凸包相离需要判断这 ...
- php linux部署相关
http://www.itbulu.com/wdcp-php55.html http://www.wdlinux.cn/wdcp/install.html http://www.yiichina.co ...
- angularjs指令中的compile与link函数详解(转)
http://www.jb51.net/article/58229.htm 通常大家在使用ng中的指令的时候,用的链接函数最多的是link属性,下面这篇文章将告诉大家complie,pre-link, ...
- 利用nginx+lua+memcache实现灰度发布
一.灰度发布原理说明 灰度发布在百度百科中解释: 灰度发布是指在黑与白之间,能够平滑过渡的一种发布方式.AB test就是一种灰度发布方式,让一部分用户继续用A,一部分用户开始用B,如果用户对B没有什 ...
- 转载RabbitMQ入门(2)--工作队列
工作队列 (使用Java客户端) 在这第一指南部分,我们写了通过同一命名的队列发送和接受消息.在这一部分,我们将会创建一个工作队列,在多个工作者之间使用分布式时间任务. 工作队列(亦称:任务队列)背后 ...
- TCP/IP详解学习笔记(8)-DNS域名系统
前面已经提到了访问一台机器要靠IP地址和MAC地址,其中,MAC地址可以通过ARP协议得到,所以这对用户是透明的,但是IP地址就不行,无论如何用户都需要用一个指定的IP来访问一台计算机,而IP地址又非 ...
- iOS 获取已连接的wifi信息
转:http://blog.csdn.net/marujunyy/article/details/16843173 首先需要 #import <SystemConfiguration/Cap ...
- git中reset与revert的使用
http://alpha-blog.wanglianghome.org/2010/07/30/git-partial-rollback/ reset(版本撤回) 格式 git reset [-q] [ ...
- poj1247 bjfu1239水题
其实就是读题啦,读懂题很简单,就是问一个数组,存不存在一个点,按这个点切成两半,这两半的数字的和是一样的.不多说了,上代码 /* * Author : ben */ #include <cstd ...
- 常见设计模式解析和实现(C++)FlyWeight模式
作用:运用共享技术有效地支持大量细粒度的对象 UML结构图: 解析: Flyweight模式在大量使用一些可以被共享的对象的时候使用.比如,在QQ聊天时很多时候你懒得回复又不得不回复,一般会用一些客套 ...