このリポジトリから Docker-ELK をビルドしたい。
これは私のlogstash.confファイルです
input {
jdbc {
jdbc_driver_library => "/home/edsoft/IdeaProjects/docker-elk/resources/mysql-connector-java-5.1.36-bin.jar"
jdbc_driver_class => "com.mysql.jdbc.Driver"
jdbc_connection_string => "jdbc:mysql://localhost:3306/yazilimokulu"
jdbc_user => "root"
jdbc_password => "1"
schedule => "* * * * *"
statement => "select * from posts"
}
tcp {
port => 5000
}
}
## Add your filters / logstash plugins configuration here
output {
elasticsearch {
hosts => ["elasticsearch:9200"]
index => "posts"
document_type => "post"
document_id => "%{id}" ## must be lower case
}
}
docker-compose で docker を実行します。Kibana と ElasticSearch は正常に起動しますが、Logstash はエラーをスローします
LoadError: no such file to load -- /home/edsoft/IdeaProjects/docker-elk/resources/mysql-connector-java-5.1.36-bin
logstash_1 | require at org/jruby/RubyKernel.java:1040
logstash_1 | require at /usr/share/logstash/vendor/bundle/jruby/1.9/gems/polyglot-0.3.5/lib/polyglot.rb:65
logstash_1 | load_drivers at /usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-input-jdbc-4.1.3/lib/logstash/plugin_mixins/jdbc.rb:134
logstash_1 | each at org/jruby/RubyArray.java:1613
logstash_1 | load_drivers at /usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-input-jdbc-4.1.3/lib/logstash/plugin_mixins/jdbc.rb:132
logstash_1 | prepare_jdbc_connection at /usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-input-jdbc-4.1.3/lib/logstash/plugin_mixins/jdbc.rb:146
logstash_1 | register at /usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-input-jdbc-4.1.3/lib/logstash/inputs/jdbc.rb:191
logstash_1 | register_plugin at /usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:282
logstash_1 | register_plugins at /usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:293
logstash_1 | each at org/jruby/RubyArray.java:1613
logstash_1 | register_plugins at /usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:293
logstash_1 | start_inputs at /usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:436
logstash_1 | start_workers at /usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:337
logstash_1 | run at /usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:232
logstash_1 | start_pipeline at /usr/share/logstash/logstash-core/lib/logstash/agent.rb:387
path ...bin.jar と書きますが、エラーでファイル名から .jar を削除します。..bin.jar.jar エラーコードは ..bin.jar と書いていますが、ファイルが見つかりません。
私を助けてください
ありがとうございました