How to use logstash-input-plugin for sequel unsupported DB


(kikuchan) #1

hi.
I have to use HiRDB(RDB),but I could not connect HiRDB by logstash-input-plugin.
When I tried to connect HiRDB by logstash-input-plugin, I used the following config file.

・config file

input {
jdbc {
jdbc_driver_library => "C:/win32app/hitachi/hirdb_s/CLIENT/UTL/pdjdbc4.jar
jdbc_driver_class => "JP.co.Hitachi.soft.HiRDB.JDBC.HiRDBDriver"
jdbc_connection_string => "jdbc:hitachi.hirdb://DBID=port,DBHOST=hostname"
jdbc_user => "user"
jdbc_password => "pass"
statement => "SELECT * FROM TABLE
}
}

filter {}

output { stdout { codec => rubydebug } }


I have the following error.

・Error

Error: JP.co.Hitachi.soft.HiRDB.JDBC.HiRDBDriver not loaded. Are you sure you've included the correct jdbc driver in :jdbc_driver_library?
You may be interested in the '--configtest' flag which you can use to validate logstash'ss configuration before you choose to restart a running system.

I had been looking for Error message,so I found the error message in the following file.

・file

logstash-1.5.3\vendor\bundle\jruby\1.9\gems\logstash-input-jdbc-1.0.0\lib\logstash\plugin_mixins\jdbc.rb

I tried to look at the contents of this file, the error seemed to occur in parts of the following source code.

・source coude

begin
Sequel::JDBC.load_driver(@jdbc_driver_lass)
rescue Sequel::AdapterNotFound => e
message = if @jdbc_driver_library.nil?
":jdbc_driver_library is not set, are you sure included the proper driver client libraries in your classpath?

else
"Are you sure you've included the correct jdbc driver in :jdbc_driver_library?
end
raise LogStash::ConfigurationError, "#{e}. #{message}"
end

I looked at "Sequel" and I found the reason.
HiRDB is not supported by Sequel.
http://sequel.jeremyevans.net/

How to use logstash-input-plugin for Sequel unsupported DB?
please help me.


(system) #2