Logstash INPUT MySQL

你说的曾经没有我的故事 提交于 2020-01-01 05:50:19

问题


Can't find any input plugin for Relational Databases in Logstash Documentation.

What is the best approach to import data from one Relational Database Table with logstash? Is to connect Elastic Search directly to the database using JDBC?


回答1:


You'll need to use JDBC River (https://github.com/jprante/elasticsearch-river-jdbc) for loading JDBC data into elastic search (or write your own code to do it).

It looks like there are several JIRAs open requesting JDBC loading in Logstash, but they haven't been worked: https://logstash.jira.com/browse/LOGSTASH-1764




回答2:


There's this

WIP: Under Development, NOT FOR PRODUCTION

This is a plugin for Logstash.

It is fully free and fully open source. The license is Apache 2.0, meaning you are pretty much free to use it however you want in whatever way.

Logstash provides infrastructure to automatically generate documentation for this plugin. We use the asciidoc format to write documentation so any comments in the source code will be first converted into asciidoc and then into html. All plugin documentation are placed under one central location.




回答3:


So far, there is no any Logstash API for reading SQL.

For my recommendation, you can write a program/script such as JAVA/python to read the logs from sql database and write to a file. Then use logstash file API to read from the file. The Logstash website has getting started tutorial. It is easy to learn.
Good Luck



来源:https://stackoverflow.com/questions/23493282/logstash-input-mysql

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!