How could I build jdbc input plugin?


(Ducheol Kim) #1

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


(Karthikbox) #2

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


Installing "logstash-input-jdbc" I think I'm missing something
(Ducheol Kim) #3

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


(Pavan R Gowda) #4

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


(system) #5