本文共 355 字,大约阅读时间需要 1 分钟。
打开cmd.exe,进入D:\download\logstash-6.3.2\logstash-6.3.2\bin,输入logstash -f ../config/mysql.conf,结果出现报错"reason"=>"no such index and [action.auto_create_index]。。。,原因是要在elasticsearch的配置文件手动创建index,然后我在D:\download\elasticsearch-6.3.2\elasticsearch-6.3.2\config目录下的elasticsearch.yml的最后一行加入index,红圈的是我加入的index。
最后就成功的把mysql数据同步到elasticsearch中了,如下:
同时也能用Postman获取到:
转载地址:http://fdain.baihongyu.com/