logstash mysql输入插件没有运行

时间:2016-10-11 18:49:10

标签: mysql input logstash

我正在运行logstash 2.4.0 这是我的配置文件

        input {
  jdbc {
    jdbc_driver_class => "com.mysql.jdbc.Driver"
    jdbc_driver_library => "/PATH/mysql-connector-java-5.1.40-bin.jar"
    jdbc_connection_string => "jdbc:mysql://HOST:3306/test"
    jdbc_user => "te"
    jdbc_password => "te0"
    schedule => "5 * * * *"
    statement => "SELECT * FROM test WHERE updated_at > :sql_last_value"
  }
}

output {
  stdout {
    codec => json
  }
  elasticsearch {
    host => "10.45.12.180:9200"
    index => "trst"
  }
}

这是我得到的错误:

  

./ bin / logstash agent -f mysqllogstash.conf设置:默认管道   工人:16

Pipeline aborted due to error {:exception=>"LogStash::ConfigurationError", :backtrace=>["/home/ksugana/logstash-2.4.0/vendor/bundle/jruby/1.9/gems/logstash-input-jdbc-3.1.0/lib/logstash/plugin_mixins/jdbc.rb:159:in `prepare_jdbc_connection'", "/home/ksugana/logstash-2.4.0/vendor/bundle/jruby/1.9/gems/logstash-input-jdbc-3.1.0/lib/logstash/inputs/jdbc.rb:187:in `register'", "/home/ksugana/logstash-2.4.0/vendor/bundle/jruby/1.9/gems/logstash-core-2.4.0-java/lib/logstash/pipeline.rb:330:in `start_inputs'", "org/jruby/RubyArray.java:1613:in `each'", "/home/ksugana/logstash-2.4.0/vendor/bundle/jruby/1.9/gems/logstash-core-2.4.0-java/lib/logstash/pipeline.rb:329:in `start_inputs'", "/home/ksugana/logstash-2.4.0/vendor/bundle/jruby/1.9/gems/logstash-core-2.4.0-java/lib/logstash/pipeline.rb:180:in `start_workers'", "/home/ksugana/logstash-2.4.0/vendor/bundle/jruby/1.9/gems/logstash-core-2.4.0-java/lib/logstash/pipeline.rb:136:in `run'", "/home/ksugana/logstash-2.4.0/vendor/bundle/jruby/1.9/gems/logstash-core-2.4.0-java/lib/logstash/agent.rb:491:in `start_pipeline'"], :level=>:error}

我已经运行-configtest,但没有配置错误。 debug没有提供比这更多的信息。我可以使用此主机上的mysql客户端连接到数据库。 任何帮助赞赏。

使用logstash 2.3.2运行我收到此错误。

由于错误导致管道中止{:exception =>#

:: ConfigurationError:Java :: com.mysql.jdbc.Driver未加载。您确定您在以下网址中包含了正确的jdbc驱动程序:jdbc_driver_library?>

0 个答案:

没有答案