How could I build jdbc input plugin?

Hi All.

I try to build jdbc plugin which is mentioned below.

I follow the instruction in the https://www.elastic.co/guide/en/logstash/current/_how_to_write_a_logstash_input_plugin.html and I got below error.

$ bundle install
Updating git://github.com/elasticsearch/logstash.git
Fetching gem metadata from https://rubygems.org/...........
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Could not find gem 'logstash-devutils (>= 0) ruby' in any of the gem sources listed in your Gemfile or installed on this machine.
$

I google the output and find below.

I try to install logstash-devutils-0.0.13-java , but I got below message.
$sudo gem install logstash-devutils-0.0.13-java.gem
ERROR: Could not find a valid gem 'logstash-devutils-0.0.13-java.gem' (>= 0) in any repository

So I install jruby, but original problem isn't solved.

Somebody help me how to solve logstash-devutils (>= 0) dependency problem ?

Thanks

2 Likes

Hi @Ducheol_Kim, have you been able to solve this problem? I have the same issue, please share your solution.

Hi @karthikbox

I follow below steps and it works for me.
$ git clone https://github.com/logstash-plugins/logstash-input-jdbc.git
$ cd logstash-input-jdbc
$ gem build logstash-input-jdbc.gemspec
$ copy logstash-input-jdbc-0.1.1.gem <LOGSTASH_DIR>
$ cd <LOGSTASH_DIR>
$ bin/plugin install logstash-input-jdbc

If you are using this plugin for oracle, you have to put "Java::" prefix at adbc_driver_class clause.

In my case, I spend lots of time to prepare compile instance and below was helpful.

Good luck

Ducheol_Kim, can you please post me the working jdbc input configuration?