Create database input plugin

Description

I am trying to create a custom database input plugin like the existing sqlite plugin. For a POC in wanted to use a MySQL DB. I created a custom config and added a plugin script to the jar in inputs folder. When i am executing the agent i always end in following error message:

The error reported is:
LoadError: no such file to load – sequel/adapters/MySQL
org/jruby/RubyKernel.java:1084:in `require'
jar:file:/C:/logstash-dev/logstash-1.3.1-flatjar.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55:in `require'
jar:file:/C:/logstash-dev/logstash-1.3.1-flatjar.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:53:in `require'
file:/C:/logstash-dev/logstash-1.3.1-flatjar.jar!/logstash/JRUBY-6970.rb:27:in `require'
file:/C:/logstash-dev/logstash-1.3.1-flatjar.jar!/polyglot.rb:63:in `require'
file:/C:/logstash-dev/logstash-1.3.1-flatjar.jar!/sequel/database/connecting.rb:29:in `adapter_class'
file:/C:/logstash-dev/logstash-1.3.1-flatjar.jar!/sequel/database/connecting.rb:68:in `connect'
file:/C:/logstash-dev/logstash-1.3.1-flatjar.jar!/sequel/core.rb:95:in `connect'
file:/C:/logstash-dev/logstash-1.3.1-flatjar.jar!/logstash/inputs/databases.rb:21:in `register'
file:/C:/logstash-dev/logstash-1.3.1-flatjar.jar!/logstash/pipeline.rb:128:in `start_inputs'
org/jruby/RubyArray.java:1613:in `each'
file:/C:/logstash-dev/logstash-1.3.1-flatjar.jar!/logstash/pipeline.rb:127:in `start_inputs'
file:/C:/logstash-dev/logstash-1.3.1-flatjar.jar!/logstash/pipeline.rb:65:in `run'
file:/C:/logstash-dev/logstash-1.3.1-flatjar.jar!/logstash/agent.rb:133:in `execute'
logstash/runner.rb:201:in `run'
org/jruby/RubyProc.java:271:in `call'
file:/C:/logstash-dev/logstash-1.3.1-flatjar.jar!/stud/task.rb:12:in `initialize'

The error message varies according to connectstring, but the general fault is, that the mysql file cannot be found. Checking the logstash jar, mysql.rb file is present in all paths.

Assignee

Logstash Developers

Reporter

Thorsten Moeller

Affects versions

Configure