In logstash 2.0 latest version for jdbc input plugin having the issue
The error reported is:
TypeError: cannot convert instance of class org.jruby.RubyObject to class java.lang.String
Following is my configuration : anything wrong in this.
input {
jdbc {
jdbc_driver_library => "mysql-connector-java-5.1.29.jar"
jdbc_driver_class => "com.mysql.jdbc.Driver"
jdbc_connection_string => "jdbc:mysql://localhost:3306/schema"
jdbc_user => "root"
jdbc_password => "root"
schedule => "0 0/1 * * * ?"
statement => "SELECT *from table1 "
type => "type1"
}
jdbc {
jdbc_driver_library => "/mysql-connector-java-5.1.29.jar"
jdbc_driver_class => "com.mysql.jdbc.Driver"
jdbc_connection_string => "jdbc:mysql://localhost:3306/schema"
jdbc_user => "root"
jdbc_password => "root"
schedule => "0 0/1 * * * ?"
statement => "SELECT *from table2"
type => "type2"
}
}
output {
if [type] == "type1" {
elasticsearch {
hosts => "localhost:9200"
index => "type1"
}
}
if [type] == "type2" {
elasticsearch {
hosts => ["localhost:9200"]
index => "type2"
}
}
stdout
{
}
}