Question

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?

Was it helpful?

Solution

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

OTHER TIPS

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.

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top